From ee4912eb07925d5602645d09aa41fb39f7909c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20Sp=C3=B6rlein?= Date: Fri, 11 Jun 2010 17:02:57 +0000 Subject: [PATCH] Initialize variables before usage. Found by: clang static analyzer Found by: Coverity Prevent[tm] (CID 7736, 7760) --- sbin/camcontrol/modeedit.c | 1 + sbin/gvinum/gvinum.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sbin/camcontrol/modeedit.c b/sbin/camcontrol/modeedit.c index 3fb9587e206..eaf87d63295 100644 --- a/sbin/camcontrol/modeedit.c +++ b/sbin/camcontrol/modeedit.c @@ -394,6 +394,7 @@ load_format(const char *pagedb_path, int page) SLIST_INIT(&namelist); + c = '\0'; depth = 0; lineno = 0; found = 0; diff --git a/sbin/gvinum/gvinum.c b/sbin/gvinum/gvinum.c index 041f1409ccd..3b350f8151a 100644 --- a/sbin/gvinum/gvinum.c +++ b/sbin/gvinum/gvinum.c @@ -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) {