[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH 03/11] gfs2_edit: Fix possible uninitialized access



Spotted by coverity: Using uninitialized value "ch".

Signed-off-by: Andrew Price <anprice redhat com>
---
 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]