From: Evan Hunt Date: Sun, 10 Jun 2018 06:03:38 +0000 (-0700) Subject: complete strtok fix X-Git-Tag: v9.9.13rc1~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=535aa0e034c9dcecc7f49747a7b1d9c5034e3096;p=thirdparty%2Fbind9.git complete strtok fix (cherry picked from commit 74c3b9d3b2669740596d5d1e5aae2a32695f3a73) --- diff --git a/bin/named/main.c b/bin/named/main.c index 5b213914ab5..200e348a8c6 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -427,7 +427,6 @@ set_flags(const char *arg, struct flag_def *defs, unsigned int *ret) { static void parse_T_opt(char *option) { const char *p; - char *last = NULL; /* * force the server to behave (or misbehave) in * specified ways for testing purposes. @@ -466,7 +465,7 @@ parse_T_opt(char *option) { } else if (!strncmp(option, "maxudp=", 7)) { maxudp = atoi(option + 7); } else if (!strncmp(option, "mkeytimers=", 11)) { - p = strtok(option + 11, "/", &last); + p = strtok(option + 11, "/"); if (p == NULL) { ns_main_earlyfatal("bad mkeytimer"); } @@ -476,7 +475,7 @@ parse_T_opt(char *option) { ns_main_earlyfatal("bad mkeytimer"); } - p = strtok(NULL, "/", &last); + p = strtok(NULL, "/"); if (p == NULL) { dns_zone_mkey_day = (24 * dns_zone_mkey_hour); dns_zone_mkey_month = (30 * dns_zone_mkey_day); @@ -487,7 +486,7 @@ parse_T_opt(char *option) { if (dns_zone_mkey_day < dns_zone_mkey_hour) ns_main_earlyfatal("bad mkeytimer"); - p = strtok(NULL, "/", &last); + p = strtok(NULL, "/"); if (p == NULL) { dns_zone_mkey_month = (30 * dns_zone_mkey_day); return;