mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
coverity: check cmd pointer exists
Since in _report_init() we check few times for cmd != NULL keep it consistent and Coverity happier.
This commit is contained in:
parent
68955a8102
commit
a9634e993a
@ -4384,7 +4384,7 @@ static int _report_init(const struct command *cmd, const char *subcommand)
|
|||||||
selection, NULL, NULL)))
|
selection, NULL, NULL)))
|
||||||
goto_out;
|
goto_out;
|
||||||
|
|
||||||
if ((_report_type & DR_TREE) && !_build_whole_deptree(cmd)) {
|
if ((_report_type & DR_TREE) && cmd && !_build_whole_deptree(cmd)) {
|
||||||
err("Internal device dependency tree creation failed.");
|
err("Internal device dependency tree creation failed.");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user