From: Simon Wilkinson Date: Fri, 22 Feb 2013 10:20:58 +0000 (+0000) Subject: viced: Catch GetCellInfo failure X-Git-Tag: upstream/1.8.0_pre1^2~1441 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1d1ba5f74102ae703ef657aa19150729edfe6ab2;p=packages%2Fo%2Fopenafs.git viced: Catch GetCellInfo failure If GetCellInfo returns a non-zero result, catch the error, rather than just carrying on regardless. Caught by clang-analyzer Change-Id: I6b9ca91c8cea2ff0d68873913abdc0daadcc0e27 Reviewed-on: http://gerrit.openafs.org/9240 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman --- diff --git a/src/viced/viced.c b/src/viced/viced.c index cd5c23075..4abbb4a24 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -1508,6 +1508,11 @@ vl_Initialize(struct afsconf_dir *dir) exit(1); } code = afsconf_GetCellInfo(dir, NULL, AFSCONF_VLDBSERVICE, &info); + if (code) { + ViceLog(0, + ("vl_Initialize: Failed to get cell information\n")); + exit(1); + } if (info.numServers > MAXSERVERS) { ViceLog(0, ("vl_Initialize: info.numServers=%d (> MAXSERVERS=%d)\n",