From: Sebastien GODARD Date: Sat, 6 Feb 2021 17:12:02 +0000 (+0100) Subject: sa_common.c: Remove some dead code X-Git-Tag: v12.5.3~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9dcf7c708596106826c6fc5e346393c0b4d3c22a;p=sysstat sa_common.c: Remove some dead code Signed-off-by: Sebastien GODARD --- diff --git a/sa_common.c b/sa_common.c index 27aa4cb..0fa2cec 100644 --- a/sa_common.c +++ b/sa_common.c @@ -2666,39 +2666,6 @@ void set_bitmaps(struct activity *act[], uint64_t *flags) } } -/* - *************************************************************************** - * Count number of comma-separated values in arguments list. For example, - * the number will be 3 for "sar --dev=sda,sdb,sdc -dp 2 5", 1 for - * "sar --dev=sda -dp 2 5" and 0 for "sar --dev= -dp 2 5". - * - * IN: - * @arg_v Argument containing the list of coma-separated values. - * - * RETURNS: - * Number of comma-separated values in the list. - *************************************************************************** - */ -int count_csval_arg(char *arg_v) -{ - int nr = 0; - char *t; - - if (arg_v[0] == '\0') - return 0; - - if (strchr(arg_v, ',')) { - for (t = arg_v; t; t = strchr(t + 1, ',')) { - nr++; - } - } - if (!nr) { - nr = 1; - } - - return nr; -} - /* *************************************************************************** * Look for item in list.