]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
reorder test to silence cppcheck
authorMark Andrews <marka@isc.org>
Thu, 15 Feb 2018 03:50:36 +0000 (14:50 +1100)
committerMark Andrews <marka@isc.org>
Fri, 16 Feb 2018 03:08:26 +0000 (14:08 +1100)
bin/dig/dig.c

index b53c44d414bf5fab9c0ccb00864ef715b064b395..620dde33eb710e8e1a4eeabe68483cf78cbe3327 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2000-2017  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000-2018  Internet Systems Consortium, Inc. ("ISC")
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1884,8 +1884,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
                                bargc = 1;
                                input = batchline;
                                bargv[bargc] = next_token(&input, " \t\r\n");
-                               while ((bargv[bargc] != NULL) &&
-                                      (bargc < 62)) {
+                               while ((bargc < 62) && (bargv[bargc] != NULL)) {
                                        bargc++;
                                        bargv[bargc] =
                                                next_token(&input, " \t\r\n");
@@ -2084,7 +2083,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
                                goto next_line;
                        input = batchline;
                        bargv[bargc] = next_token(&input, " \t\r\n");
-                       while ((bargv[bargc] != NULL) && (bargc < 14)) {
+                       while ((bargc < 14) && (bargv[bargc] != NULL)) {
                                bargc++;
                                bargv[bargc] = next_token(&input, " \t\r\n");
                        }
@@ -2154,7 +2153,7 @@ query_finished(void) {
                bargc = 1;
                input = batchline;
                bargv[bargc] = next_token(&input, " \t\r\n");
-               while ((bargv[bargc] != NULL) && (bargc < 14)) {
+               while ((bargc < 14) && (bargv[bargc] != NULL)) {
                        bargc++;
                        bargv[bargc] = next_token(&input, " \t\r\n");
                }