]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
afsmonitor: Allow CBSTATS collection to work
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 22 Feb 2013 10:30:56 +0000 (10:30 +0000)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 29 Jan 2014 19:33:10 +0000 (11:33 -0800)
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

Reviewed-on: http://gerrit.openafs.org/9235
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 75ef02d9dfb43079f111ea22ae351cf0eec13fab)

Change-Id: I45bd1152385bdb05d1d027905b52592b1bc0869f
Reviewed-on: http://gerrit.openafs.org/10749
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afsmonitor/afsmonitor.c

index f7992d64cce2eceecc0872c94ff1a63374da93b0..feb177d77bc26b62078682e723f3d17c5c93ad24 100644 (file)
@@ -1735,12 +1735,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