Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 2010 17:02:57 +0000 (UTC)
From:      Ulrich Spoerlein <uqs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r209051 - in head/sbin: camcontrol gvinum
Message-ID:  <201006111702.o5BH2vUE035614@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: uqs
Date: Fri Jun 11 17:02:57 2010
New Revision: 209051
URL: http://svn.freebsd.org/changeset/base/209051

Log:
  Initialize variables before usage.
  
  Found by:	clang static analyzer
  Found by:	Coverity Prevent[tm] (CID 7736, 7760)

Modified:
  head/sbin/camcontrol/modeedit.c
  head/sbin/gvinum/gvinum.c

Modified: head/sbin/camcontrol/modeedit.c
==============================================================================
--- head/sbin/camcontrol/modeedit.c	Fri Jun 11 15:56:18 2010	(r209050)
+++ head/sbin/camcontrol/modeedit.c	Fri Jun 11 17:02:57 2010	(r209051)
@@ -394,6 +394,7 @@ load_format(const char *pagedb_path, int
 
 	SLIST_INIT(&namelist);
 
+	c = '\0';
 	depth = 0;
 	lineno = 0;
 	found = 0;

Modified: head/sbin/gvinum/gvinum.c
==============================================================================
--- head/sbin/gvinum/gvinum.c	Fri Jun 11 15:56:18 2010	(r209050)
+++ head/sbin/gvinum/gvinum.c	Fri Jun 11 17:02:57 2010	(r209051)
@@ -644,6 +644,7 @@ gvinum_detach(int argc, char **argv)
 	struct gctl_req *req;
 	int flags, i;
 
+	flags = 0;
 	optreset = 1;
 	optind = 1;
 	while ((i = getopt(argc, argv, "f")) != -1) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006111702.o5BH2vUE035614>