From 1d1ba5f74102ae703ef657aa19150729edfe6ab2 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 22 Feb 2013 10:20:58 +0000 Subject: [PATCH] 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 --- src/viced/viced.c | 5 +++++ 1 file changed, 5 insertions(+) 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", -- 2.39.5