Skip to content

Commit d043f9a

Browse files
Mikulas PatockaMike Snitzer
authored andcommitted
dm ioctl: a small code cleanup in list_version_get_info
No need to modify info->vers if we overwrite it immediately. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent 19eb165 commit d043f9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/dm-ioctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ static void list_version_get_info(struct target_type *tt, void *param)
681681
strcpy(info->vers->name, tt->name);
682682

683683
info->old_vers = info->vers;
684-
info->vers = align_ptr(((void *) ++info->vers) + strlen(tt->name) + 1);
684+
info->vers = align_ptr((void *)(info->vers + 1) + strlen(tt->name) + 1);
685685
}
686686

687687
static int __list_versions(struct dm_ioctl *param, size_t param_size, const char *name)

0 commit comments

Comments
 (0)