diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2015-07-08 14:53:23 +0200 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2015-07-08 14:53:30 +0200 |
commit | 3ec4813ba22adedb8914089b6f17fe779d76ee77 (patch) | |
tree | 079ac30beaab2836e483b09282cbcac9f90b8383 /tools/pvmove.c | |
parent | e8dbaf62d3b3e2a175d3b0237a4d85c009d98038 (diff) | |
download | lvm2-3ec4813ba22adedb8914089b6f17fe779d76ee77.tar.gz |
coverity: fix missing initialization
... Using uninitialized value "lockd_state" when calling "lockd_vg"
(even though lockd_vg assigns 0 to the lockd_state, but it looks at
previous state of lockd_state just before that so we need to have
that properly initialized!)
libdm/libdm-report.c:2934: uninit_use_in_call: Using uninitialized value "tm". Field "tm.tm_gmtoff" is uninitialized when calling "_get_final_time".
daemons/lvmlockd/lvmlockctl.c:273: uninit_use_in_call: Using uninitialized element of array "r_name" when calling "format_info_r_action". (just added FIXME as this looks unfinished?)
Diffstat (limited to 'tools/pvmove.c')
-rw-r--r-- | tools/pvmove.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/pvmove.c b/tools/pvmove.c index 17416d42b..70826c647 100644 --- a/tools/pvmove.c +++ b/tools/pvmove.c @@ -600,7 +600,7 @@ static int _set_up_pvmove(struct cmd_context *cmd, const char *pv_name, struct dm_list *lvs_changed; struct physical_volume *pv; struct logical_volume *lv_mirr; - uint32_t lockd_state; + uint32_t lockd_state = 0; unsigned flags = PVMOVE_FIRST_TIME; unsigned exclusive; int r = ECMD_FAILED; @@ -726,7 +726,7 @@ static int _read_poll_id_from_pvname(struct cmd_context *cmd, const char *pv_nam struct logical_volume *lv; struct physical_volume *pv; struct volume_group *vg; - uint32_t lockd_state; + uint32_t lockd_state = 0; if (!pv_name) { log_error(INTERNAL_ERROR "Invalid PV name parameter."); |