From: Tobias Brunner Date: Tue, 28 Jan 2020 13:38:27 +0000 (+0100) Subject: sw-collector: Avoid naming conflicts with local count variables X-Git-Tag: 5.8.3dr1~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7126dd47ea0397a13cfada8f00e340dd53d5aac;p=thirdparty%2Fstrongswan.git sw-collector: Avoid naming conflicts with local count variables --- diff --git a/src/sw-collector/sw-collector.c b/src/sw-collector/sw-collector.c index 5453eeb60e..f88e55cb28 100644 --- a/src/sw-collector/sw-collector.c +++ b/src/sw-collector/sw-collector.c @@ -40,7 +40,7 @@ */ static int debug_level = 2; static bool stderr_quiet = FALSE; -static int count = 0; +static int max_count = 0; typedef enum collector_op_t collector_op_t; @@ -169,7 +169,7 @@ static collector_op_t do_args(int argc, char *argv[], bool *full_tags, op = COLLECTOR_OP_CHECK; continue; case 'c': - count = atoi(optarg); + max_count = atoi(optarg); continue; case 'd': debug_level = atoi(optarg); @@ -344,10 +344,10 @@ static int extract_history(sw_collector_db_t *db) } else if (match("End-Date", &cmd)) { - /* Process 'count' events at a time */ - if (count > 0 && eid - last_eid == count) + /* Process 'max_count' events at a time */ + if (max_count > 0 && eid - last_eid == max_count) { - fprintf(stderr, "added %d events\n", count); + fprintf(stderr, "added %d events\n", max_count); goto end; } }