Fix unitialized variable warning in cfghost.c
authorAndrew Deason <adeason@sinenomine.net>
Thu, 15 Oct 2009 03:43:27 +0000 (22:43 -0500)
committerJeffrey Altman <jaltman|account-1000011@unknown>
Thu, 15 Oct 2009 12:03:29 +0000 (05:03 -0700)
Initialize cellentry. It does not appear to be possible to actually hit
code that references an uninitialized cellentry, but the compiler can
still complain.

Reviewed-on: http://gerrit.openafs.org/665
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/libadmin/cfg/cfghost.c

index d230686..4cd6043 100644 (file)
@@ -162,7 +162,7 @@ cfg_HostQueryStatus(const char *hostName,   /* name of host */
            /* one or more config files appears to be invalid */
            serverSt = ADMCFGSERVERBASICINFOINVALID;
        } else {
-           struct afsconf_entry *cellentry;
+           struct afsconf_entry *cellentry = NULL;
 
            if (confdir->cellName == NULL || *confdir->cellName == '\0') {
                /* no cell set for server */