diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-05-29 19:17:39 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-05-29 19:17:39 +0000 |
commit | d567659bf4003c0808c309a52100a32a82a4b128 (patch) | |
tree | 1d51d055db3cb063c8186d49c8000e6a71cc7134 /lib/netrc.c | |
parent | e0558ae541d94c1d183d2cb67c5edf120ba6974b (diff) | |
download | curl-d567659bf4003c0808c309a52100a32a82a4b128.tar.gz |
strtok() replaced with strtok_r()
Diffstat (limited to 'lib/netrc.c')
-rw-r--r-- | lib/netrc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/netrc.c b/lib/netrc.c index 6a712d4fd..b7ffc1b4a 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -111,8 +111,9 @@ int Curl_parsenetrc(char *host, file = fopen(netrcbuffer, "r"); if(file) { char *tok; + char *tok_buf; while(fgets(netrcbuffer, sizeof(netrcbuffer), file)) { - tok=strtok(netrcbuffer, " \t\n"); + tok=strtok_r(netrcbuffer, " \t\n", &tok_buf); while(tok) { switch(state) { case NOTHING: @@ -163,7 +164,7 @@ int Curl_parsenetrc(char *host, } break; } /* switch (state) */ - tok = strtok(NULL, " \t\n"); + tok = strtok_r(NULL, " \t\n", &tok_buf); } /* while (tok) */ } /* while fgets() */ |