Skip to contentSkip to conversation

master - coverity: dmsetup: fix possible use of uninitialized value

PATCH Peter Rajnoha 1 participant 1 message Sep 21, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=926a56578185c7f22c9b3e9c36ff660ce6288c16
Commit:        926a56578185c7f22c9b3e9c36ff660ce6288c16
Parent:        7ea5758c919022e6bca9ebe15aec160fd5ef2430
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Wed Sep 21 15:52:23 2016 +0200
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Wed Sep 21 15:52:23 2016 +0200

coverity: dmsetup: fix possible use of uninitialized value

---
 tools/dmsetup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/dmsetup.c +1 -1
index 5f4c192..5b817bb 100644
@@ -4956,7 +4956,7 @@ static int _stats_create_file(CMD_ARGS)
 	struct dm_histogram *bounds = NULL;
 	char *path, *abspath = NULL;
 	struct dm_stats *dms = NULL;
-	int group, fd, precise;
+	int group, fd = -1, precise;
 
 	if (_switches[AREAS_ARG] || _switches[AREA_SIZE_ARG]) {
 		log_error("--filemap is incompatible with --areas and --area-size.");