mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
clang: ensure status is initilized
Initialize status before handling error path.
This commit is contained in:
parent
cb61d2294a
commit
6a0e54f84f
@ -5036,6 +5036,9 @@ static int _fsadm_cmd(enum fsadm_cmd_e fcmd,
|
||||
find_config_tree_str(cmd, global_fsadm_executable_CFG, NULL)
|
||||
};
|
||||
|
||||
if (status)
|
||||
*status = -1;
|
||||
|
||||
if (!argv[0] || !*argv[0]) {
|
||||
log_error("Cannot use misconfigured fsadm executable to resize %s.", display_lvname(lv));
|
||||
return 0;
|
||||
@ -5055,9 +5058,6 @@ static int _fsadm_cmd(enum fsadm_cmd_e fcmd,
|
||||
|
||||
argv[i++] = (fcmd == FSADM_CMD_RESIZE) ? "resize" : "check";
|
||||
|
||||
if (status)
|
||||
*status = -1;
|
||||
|
||||
if (dm_snprintf(lv_path, sizeof(lv_path), "%s%s/%s", cmd->dev_dir,
|
||||
vg->name, lv->name) < 0) {
|
||||
log_error("Couldn't create LV path for %s.", display_lvname(lv));
|
||||
|
Loading…
Reference in New Issue
Block a user