public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 daemons/clvmd/clvmd-command.c tools/lvmdi ...
@ 2012-01-25 22:20 zkabelac
0 siblings, 0 replies; only message in thread
From: zkabelac @ 2012-01-25 22:20 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2012-01-25 22:20:11
Modified files:
daemons/clvmd : clvmd-command.c
tools : lvmdiskscan.c
Log message:
Set to a defined value vars used after error path
Static analyzer noticed this vars are used even when error is reported
back thus their state is undefined - set to 0 for this case.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.63&r2=1.64
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvmdiskscan.c.diff?cvsroot=lvm2&r1=1.22&r2=1.23
--- LVM2/daemons/clvmd/clvmd-command.c 2012/01/25 22:17:57 1.63
+++ LVM2/daemons/clvmd/clvmd-command.c 2012/01/25 22:20:11 1.64
@@ -257,7 +257,7 @@
unsigned char lock_cmd;
unsigned char lock_flags;
char *args = header->node + strlen(header->node) + 1;
- int lockid;
+ int lockid = 0;
int status = 0;
char *lockname;
--- LVM2/tools/lvmdiskscan.c 2011/05/28 09:48:16 1.22
+++ LVM2/tools/lvmdiskscan.c 2012/01/25 22:20:11 1.23
@@ -81,6 +81,7 @@
}
if (!dev_get_size(dev, &size)) {
log_error("Couldn't get size of \"%s\"", dev_name(dev));
+ size = 0;
}
_print(cmd, dev, size, NULL);
_count(dev, &disks_found, &parts_found);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-25 22:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-25 22:20 LVM2 daemons/clvmd/clvmd-command.c tools/lvmdi zkabelac
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).