1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

coverity: variable init must be done before its use

tools/polldaemon.c:465: uninit_use_in_call: Using uninitialized value "id.vg_name" when calling "print_log".
tools/polldaemon.c:465: uninit_use_in_call: Using uninitialized value "id.lv_name" when calling "print_log".
This commit is contained in:
Peter Rajnoha 2015-08-04 09:51:16 +02:00
parent c78033233a
commit 1f3d04cddf

View File

@ -461,13 +461,14 @@ static int _lvmpolld_init_poll_vg(struct cmd_context *cmd, const char *vgname,
if (!id.display_name && !lpdp->parms->aborting)
continue;
id.vg_name = lv->vg->name;
id.lv_name = lv->name;
if (!*lv->lvid.s) {
log_print_unless_silent("Missing LV uuid within: %s/%s", id.vg_name, id.lv_name);
continue;
}
id.vg_name = lv->vg->name;
id.lv_name = lv->name;
id.uuid = lv->lvid.s;
r = lvmpolld_poll_init(cmd, &id, lpdp->parms);