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 <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
This commit is contained in:
parent
19eb1650af
commit
d043f9a1ca
|
@ -681,7 +681,7 @@ static void list_version_get_info(struct target_type *tt, void *param)
|
|||
strcpy(info->vers->name, tt->name);
|
||||
|
||||
info->old_vers = info->vers;
|
||||
info->vers = align_ptr(((void *) ++info->vers) + strlen(tt->name) + 1);
|
||||
info->vers = align_ptr((void *)(info->vers + 1) + strlen(tt->name) + 1);
|
||||
}
|
||||
|
||||
static int __list_versions(struct dm_ioctl *param, size_t param_size, const char *name)
|
||||
|
|
Loading…
Reference in New Issue