[lvm-devel] master - dmsetup: remove bogus !_report test in _stats_report (Coverity)
Bryn Reeves
bmr at fedoraproject.org
Mon Aug 10 19:30:23 UTC 2015
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3b74824985f7e4e90f0ba9668724abd08d5fef74
Commit: 3b74824985f7e4e90f0ba9668724abd08d5fef74
Parent: 6bd5bf3cb5a1c01ec8be8bb714c7c0461d6bec58
Author: Bryn M. Reeves <bmr at redhat.com>
AuthorDate: Mon Aug 10 10:01:18 2015 +0100
Committer: Bryn M. Reeves <bmr at redhat.com>
CommitterDate: Mon Aug 10 20:12:53 2015 +0100
dmsetup: remove bogus !_report test in _stats_report (Coverity)
There's no point testing _report here in _stats_report: it's always
initialised before the function is called and if the check did fail
we'd end up freeing an uninitialized dm_task in the error path.
tools/dmsetup.c: 4389 in _stats_report() - Declaring variable "dmt" without initializer.
---
tools/dmsetup.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index de67b03..2ee432b 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -4397,9 +4397,6 @@ static int _stats_report(CMD_ARGS)
name = argv[1];
}
- if (!_report)
- goto out;
-
if (!(dmt = dm_task_create(DM_DEVICE_INFO)))
return 0;
More information about the lvm-devel
mailing list