]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
delare opts outside of loop; cleanup; rename variable
authorMark Andrews <marka@isc.org>
Fri, 16 Nov 2018 03:45:16 +0000 (14:45 +1100)
committerEvan Hunt <each@isc.org>
Fri, 16 Nov 2018 21:34:44 +0000 (13:34 -0800)
bin/named/server.c

index 05964c2227cc92c4e801404a6f7f2e426043df16..209a4f2b6fe81d933531138e70f21d22ca8907dd 100644 (file)
@@ -14361,6 +14361,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
        bool ttlset = false, excl = false, viewfound = false;
        dns_rdataclass_t rdclass = dns_rdataclass_in;
        bool first = true;
+       bool is_option = true;
 
        UNUSED(force);
 
@@ -14373,7 +14374,6 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
        }
 
        for (;;) {
-               bool opts = true;
 
                /* Check for options */
                ptr = next_token(lex, text);
@@ -14381,16 +14381,16 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
                        return (ISC_R_UNEXPECTEDEND);
                }
 
-               if (!opts) {
+               if (!is_option) {
                        nametext = ptr;
                } else if (strcmp(ptr, "--") == 0) {
-                       opts = false;
+                       is_option = false;
                } else if (argcheck(ptr, "dump")) {
                        dump = true;
                } else if (argcheck(ptr, "remove")) {
                        ntattl = 0;
                        ttlset = true;
-               } else if (opts && argcheck(ptr, "force")) {
+               } else if (argcheck(ptr, "force")) {
                        force = true;
                        continue;
                } else if (argcheck(ptr, "lifetime")) {