Commit 39ebebaa authored by Evan Hunt's avatar Evan Hunt
Browse files

Merge branch '701-opts-is-incorrectly-declared-inside-the-loop' into 'master'

Resolve "opts is incorrectly declared inside the loop"

Closes #701

See merge request !1075
parents 4e5ac64a e75e206a
Pipeline #6870 passed with stages
in 13 minutes and 45 seconds
...@@ -14361,6 +14361,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex, ...@@ -14361,6 +14361,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
bool ttlset = false, excl = false, viewfound = false; bool ttlset = false, excl = false, viewfound = false;
dns_rdataclass_t rdclass = dns_rdataclass_in; dns_rdataclass_t rdclass = dns_rdataclass_in;
bool first = true; bool first = true;
bool is_option = true;
UNUSED(force); UNUSED(force);
...@@ -14373,7 +14374,6 @@ named_server_nta(named_server_t *server, isc_lex_t *lex, ...@@ -14373,7 +14374,6 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
} }
for (;;) { for (;;) {
bool opts = true;
/* Check for options */ /* Check for options */
ptr = next_token(lex, text); ptr = next_token(lex, text);
...@@ -14381,16 +14381,16 @@ named_server_nta(named_server_t *server, isc_lex_t *lex, ...@@ -14381,16 +14381,16 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
return (ISC_R_UNEXPECTEDEND); return (ISC_R_UNEXPECTEDEND);
} }
if (!opts) { if (!is_option) {
nametext = ptr; nametext = ptr;
} else if (strcmp(ptr, "--") == 0) { } else if (strcmp(ptr, "--") == 0) {
opts = false; is_option = false;
} else if (argcheck(ptr, "dump")) { } else if (argcheck(ptr, "dump")) {
dump = true; dump = true;
} else if (argcheck(ptr, "remove")) { } else if (argcheck(ptr, "remove")) {
ntattl = 0; ntattl = 0;
ttlset = true; ttlset = true;
} else if (opts && argcheck(ptr, "force")) { } else if (argcheck(ptr, "force")) {
force = true; force = true;
continue; continue;
} else if (argcheck(ptr, "lifetime")) { } else if (argcheck(ptr, "lifetime")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment