From 9a2741d001d89e7e828b547a05e9d89cd59733b0 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Fri, 12 Feb 2010 19:23:52 -0500 Subject: [PATCH] Initialize variable that can potentially be used uninitialized Some compiler versions complain that "code" might be used uninitialized here. If opening the configuration files fails, conf would be null and the condition would indeed test an uninitialized variable. Change-Id: I1d4da49a5afc94ac6617201110be84a0e5548f38 Reviewed-on: http://gerrit.openafs.org/1306 Reviewed-by: Simon Wilkinson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/auth/ktc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth/ktc.c b/src/auth/ktc.c index 6ee1b84d5..8fdea3c92 100644 --- a/src/auth/ktc.c +++ b/src/auth/ktc.c @@ -1757,7 +1757,7 @@ extern char **environ; static void ktc_LocalCell(void) { - int code; + int code = 0; struct afsconf_dir *conf; if ((conf = afsconf_Open(AFSDIR_CLIENT_ETC_DIRPATH)) -- 2.39.5