From 75ef02d9dfb43079f111ea22ae351cf0eec13fab Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 22 Feb 2013 10:30:56 +0000 Subject: [PATCH 1/1] afsmonitor: Allow CBSTATS collection to work The switch which selects the collection number was missing a 'break', so selecting the CBSTATS collection would always fall through to the default, error, case. Caught by clang-analyzer Change-Id: I354873d711c5f49ddad51f1b9fb332af91a6d13a Reviewed-on: http://gerrit.openafs.org/9235 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman --- src/afsmonitor/afsmonitor.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/afsmonitor/afsmonitor.c b/src/afsmonitor/afsmonitor.c index 288a519..eee5936 100644 --- a/src/afsmonitor/afsmonitor.c +++ b/src/afsmonitor/afsmonitor.c @@ -1733,12 +1733,11 @@ save_FS_results_inCB(int a_newProbeCycle) /* start of a new probe cycle ? */ break; case AFS_XSTATSCOLL_CBSTATS: index = 1; + break; default: - if (index < 0) { - fprintf(stderr, "[ %s ] collection number %d is out of range.\n", - rn, xstat_fs_Results.collectionNumber); - afsmon_Exit(51); - } + fprintf(stderr, "[ %s ] collection number %d is out of range.\n", + rn, xstat_fs_Results.collectionNumber); + afsmon_Exit(51); } /* If a new probe cycle started, mark the list in the current buffer -- 1.9.4