master - coverity: variable init must be done before its use
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1f3d04cddf5a447de9bfb81ed22d0ccbe58e82fc Commit: 1f3d04cddf5a447de9bfb81ed22d0ccbe58e82fc Parent: c78033233ab03749b37c01454310ac0c29fd5af8 Author: Peter Rajnoha <[email protected]> AuthorDate: Tue Aug 4 09:51:16 2015 +0200 Committer: Peter Rajnoha <[email protected]> CommitterDate: Tue Aug 4 09:51:16 2015 +0200
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".
--- tools/polldaemon.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
tools/polldaemon.c +3 -2
@@ -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);