1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvremove: initilize struct list

This commit is contained in:
Zdenek Kabelac 2024-05-27 18:23:26 +02:00
parent 80fa3511be
commit 533a87d0ea

View File

@ -18,7 +18,9 @@
int lvremove(struct cmd_context *cmd, int argc, char **argv)
{
struct processing_handle *handle = NULL;
struct lvremove_params lp = { 0 };
struct lvremove_params lp = {
.removed_uuids = DM_LIST_HEAD_INIT(lp.removed_uuids),
};
int ret;
if (!argc && !arg_is_set(cmd, select_ARG)) {
@ -35,8 +37,6 @@ int lvremove(struct cmd_context *cmd, int argc, char **argv)
return ECMD_FAILED;
}
dm_list_init(&lp.removed_uuids);
handle->custom_handle = &lp;
ret = process_each_lv(cmd, argc, argv, NULL, NULL, READ_FOR_UPDATE, handle,