]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Appease -Werror=maybe-uninitialized before calling strtok_r()
authorTony Finch <dot@dotat.at>
Thu, 12 Apr 2018 18:03:54 +0000 (19:03 +0100)
committerTony Finch <dot@dotat.at>
Thu, 12 Apr 2018 18:19:24 +0000 (19:19 +0100)
bin/named/statschannel.c
lib/irs/getaddrinfo.c

index 42d87a03528eb49d65ae487043b97d838181ef80..8e89196fcfb39690f00939da7cad457736792348 100644 (file)
@@ -3122,10 +3122,12 @@ render_xsl(const char *url, isc_httpdurl_t *urlinfo,
                const char *if_modified_since = "If-Modified-Since: ";
                _headers = strdup(headers);
 
+               saveptr = NULL;
                for (line = strtok_r(_headers, "\n", &saveptr);
                     line;
                     line = strtok_r(NULL, "\n", &saveptr)) {
-                       if (strncasecmp(line, if_modified_since, strlen(if_modified_since)) == 0) {
+                       if (strncasecmp(line, if_modified_since,
+                                       strlen(if_modified_since)) == 0) {
                                time_t t1, t2;
                                line += strlen(if_modified_since);
                                result = isc_time_parsehttptimestamp(line, &when);
index f3172543f1cd95da3795ae2fa09c48da7dc74d36..ed62c391b6f944eb92ef66c98b816762f5fdd6df 100644 (file)
@@ -1070,6 +1070,7 @@ set_order(int family, int (**net_order)(const char *, int, struct addrinfo **,
        } else {
                order = getenv("NET_ORDER");
                found = 0;
+               last = NULL;
                for (tok = strtok_r(order, ":", &last);
                     tok;
                     tok = strtok_r(NULL, ":", &last))