]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Avoid to use the same variable name for two different things in the cmd_parser class
authorEric Bollengier <eric@baculasystems.com>
Fri, 14 Dec 2018 16:06:17 +0000 (17:06 +0100)
committerKern Sibbald <kern@sibbald.com>
Mon, 8 Apr 2019 16:42:54 +0000 (18:42 +0200)
bacula/src/lib/cmd_parser.h

index 750a254d45b70ad26df6a299ce18c2a01fd64e34..d1904156a505d53d1e29faacf6f3e899fbb5cc20 100644 (file)
@@ -89,11 +89,11 @@ public:
     */
    int find_next_arg_with_value(const int previous, ...)
    {
-      va_list args;
+      va_list vaargs;
       for (int i=previous + 1; i<argc; i++) {
          char *arg;
-         va_start(args, previous);
-         while ((arg = va_arg(args, char *)) != NULL) {
+         va_start(vaargs, previous);
+         while ((arg = va_arg(vaargs, char *)) != NULL) {
             if (strcasecmp(arg, argk[i]) == 0) {
                if (argv[i]) {
                   /* va_end should match indentation of va_start so we can't just return here */
@@ -101,7 +101,7 @@ public:
                }
             }
          }
-         va_end(args);
+         va_end(vaargs);
          if (arg) {
             return i;
          }