diff options
author | Mike Perry <mikeperry-git@fscked.org> | 2009-08-09 18:42:29 -0700 |
---|---|---|
committer | Mike Perry <mikeperry-git@fscked.org> | 2009-08-09 18:42:29 -0700 |
commit | 9e1fe29bebf57fc38975c552eefaa9cb97dd5c68 (patch) | |
tree | 66fa5453d07640c3f20ecc1f1199ac49aa38a455 /src/or/eventdns.c | |
parent | cb477f9cc0c9d8d3fa50b06e9d3e0e057f41b75d (diff) | |
download | tor-9e1fe29bebf57fc38975c552eefaa9cb97dd5c68.tar.gz tor-9e1fe29bebf57fc38975c552eefaa9cb97dd5c68.zip |
Switch over to tor_strtok_r instead of strtok_r.
Diffstat (limited to 'src/or/eventdns.c')
-rw-r--r-- | src/or/eventdns.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c index 9578b24cae..b413b6ae97 100644 --- a/src/or/eventdns.c +++ b/src/or/eventdns.c @@ -2889,14 +2889,6 @@ evdns_resolv_set_defaults(int flags) { if (flags & DNS_OPTION_NAMESERVERS) evdns_nameserver_ip_add("127.0.0.1"); } -#ifndef HAVE_STRTOK_R -static char * -strtok_r(char *s, const char *delim, char **state) { - (void)state; - return strtok(s, delim); -} -#endif - /* helper version of atoi which returns -1 on error */ static int strtoint(const char *const str) { @@ -2973,9 +2965,9 @@ static void resolv_conf_parse_line(char *const start, int flags) { char *strtok_state; static const char *const delims = " \t"; -#define NEXT_TOKEN strtok_r(NULL, delims, &strtok_state) +#define NEXT_TOKEN tor_strtok_r(NULL, delims, &strtok_state) - char *const first_token = strtok_r(start, delims, &strtok_state); + char *const first_token = tor_strtok_r(start, delims, &strtok_state); if (!first_token) return; if (!strcmp(first_token, "nameserver") && (flags & DNS_OPTION_NAMESERVERS)) { |