]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Initialize variable that can potentially be used uninitialized
authorMarc Dionne <marc.c.dionne@gmail.com>
Sat, 13 Feb 2010 00:23:52 +0000 (19:23 -0500)
committerJeffrey Altman <jaltman@openafs.org>
Sat, 13 Feb 2010 00:47:57 +0000 (16:47 -0800)
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 <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
src/auth/ktc.c

index 6ee1b84d51ab74183d687197b129ecec343968b5..8fdea3c92a2e0cc2eae338afdbe5d01b1247f753 100644 (file)
@@ -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))