From: Simon Wilkinson Date: Fri, 22 Feb 2013 10:20:58 +0000 (+0000) Subject: viced: Catch GetCellInfo failure X-Git-Tag: upstream/1.6.3^2~81 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=e33bdad36bb96a2477f1511d82b597113919a11a;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 Reviewed-on: http://gerrit.openafs.org/9240 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 1d1ba5f74102ae703ef657aa19150729edfe6ab2) Change-Id: I205b32a3e38faeae8e06bad3dc615ba01f0626d8 Reviewed-on: http://gerrit.openafs.org/9533 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: BuildBot --- diff --git a/src/viced/viced.c b/src/viced/viced.c index 40d90874f..e580c17ec 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -1648,6 +1648,11 @@ vl_Initialize(const char *confDir) exit(1); } code = afsconf_GetCellInfo(tdir, 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",