From: Andrew Price Date: Fri, 6 Jan 2012 15:19:22 +0000 Subject: [Cluster-devel] [PATCH 03/11] gfs2_edit: Fix possible uninitialized access In-Reply-To: <1325863170-32530-1-git-send-email-anprice@redhat.com> References: <1325863170-32530-1-git-send-email-anprice@redhat.com> Message-ID: <1325863170-32530-3-git-send-email-anprice@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Spotted by coverity: Using uninitialized value "ch". Signed-off-by: Andrew Price --- gfs2/edit/hexedit.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index fcab625..72ee7d2 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -2232,7 +2232,7 @@ static void process_field(const char *field, const char *nstr) /* ------------------------------------------------------------------------ */ static void interactive_mode(void) { - int ch, Quit; + int ch = 0, Quit; if ((wind = initscr()) == NULL) { fprintf(stderr, "Error: unable to initialize screen."); -- 1.7.6.4