From: Sebastian Schmidt Date: Fri, 21 Aug 2020 09:02:18 +0000 (+0200) Subject: Remove duplicate switch case. X-Git-Tag: collectd-5.12.0~8^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3536%2Fhead;p=thirdparty%2Fcollectd.git Remove duplicate switch case. 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 --- diff --git a/src/daemon/collectd.c b/src/daemon/collectd.c index bc5cc54f7..2de0e1b10 100644 --- a/src/daemon/collectd.c +++ b/src/daemon/collectd.c @@ -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);