From: Marc Dionne Date: Sat, 13 Feb 2010 00:23:52 +0000 (-0500) Subject: Initialize variable that can potentially be used uninitialized X-Git-Tag: openafs-devel-1_5_73~185 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9a2741d001d89e7e828b547a05e9d89cd59733b0;p=packages%2Fo%2Fopenafs.git 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 --- 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))