From: Andrew Deason Date: Thu, 15 Oct 2009 03:43:27 +0000 (-0500) Subject: Fix unitialized variable warning in cfghost.c X-Git-Tag: openafs-devel-1_5_66~61 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1fa650cee2d6cc708ee29a963ad3498a808bbde8;p=packages%2Fo%2Fopenafs.git Fix unitialized variable warning in cfghost.c 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 Reviewed-by: Jeffrey Altman --- diff --git a/src/libadmin/cfg/cfghost.c b/src/libadmin/cfg/cfghost.c index d23068642..4cd6043cc 100644 --- a/src/libadmin/cfg/cfghost.c +++ b/src/libadmin/cfg/cfghost.c @@ -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 */