diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2016-02-23 21:02:36 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2016-02-23 21:40:16 +0100 |
commit | a9634e993a44760e164f0ed12aaeaa6903cc9a6e (patch) | |
tree | b9c80c1722793aed8114ed093a207c2886ac1c44 | |
parent | 68955a81024d43138ee29b682d08233baf5ee876 (diff) | |
download | lvm2-a9634e993a44760e164f0ed12aaeaa6903cc9a6e.tar.gz |
coverity: check cmd pointer exists
Since in _report_init() we check few times for cmd != NULL
keep it consistent and Coverity happier.
-rw-r--r-- | tools/dmsetup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 4db60045f..b61b42f77 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -4384,7 +4384,7 @@ static int _report_init(const struct command *cmd, const char *subcommand) selection, NULL, NULL))) 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."); goto out; } |