]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Remove duplicate switch case. 3536/head
authorSebastian Schmidt <yath@google.com>
Fri, 21 Aug 2020 09:02:18 +0000 (11:02 +0200)
committerSebastian Schmidt <yath@google.com>
Fri, 21 Aug 2020 09:02:18 +0000 (11:02 +0200)
The empty 'f' case probably used to be wrapped in its own #if
COLLECT_DAEMON, but that apparently somehow got lost and gcc 9.3
complains about the duplicate case. Therefore, just wrap the
config->daemonize assignment into #if/#endif, like for the other cases.

ChangeLog: collectd: Build fix

src/daemon/collectd.c

index bc5cc54f73bff349f91818d52038a51ecee10486..2de0e1b10478862e48c1f5463e53d4c152bfba5e 100644 (file)
@@ -334,9 +334,9 @@ static void read_cmdline(int argc, char **argv, struct cmdline_config *config) {
 #endif /* COLLECT_DAEMON */
       break;
     case 'f':
+#if COLLECT_DAEMON
       config->daemonize = false;
-      break;
-    case 'f':
+#endif /* COLLECT_DAEMON */
       break;
     case 'h':
       exit_usage(EXIT_SUCCESS);