diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-11-22 09:01:24 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-11-23 08:26:51 +0100 |
commit | dcd6f810255785d52b89150e18460fb0899d4f7e (patch) | |
tree | c3cb7cdcb79dbf752edcd997934e44a2e9998397 /lib/asyn-thread.c | |
parent | 9944d6ba334f07b0b6199bdb5bb82091c88c16ed (diff) | |
download | curl-dcd6f810255785d52b89150e18460fb0899d4f7e.tar.gz |
snprintf: renamed and we now only use msnprintf()
The function does not return the same value as snprintf() normally does,
so readers may be mislead into thinking the code works differently than
it actually does. A different function name makes this easier to detect.
Reported-by: Tomas Hoger
Assisted-by: Daniel Gustafsson
Fixes #3296
Closes #3297
Diffstat (limited to 'lib/asyn-thread.c')
-rw-r--r-- | lib/asyn-thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index 4c8f88b14..74208d7ec 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -277,7 +277,7 @@ static unsigned int CURL_STDCALL getaddrinfo_thread(void *arg) char service[12]; int rc; - snprintf(service, sizeof(service), "%d", tsd->port); + msnprintf(service, sizeof(service), "%d", tsd->port); rc = Curl_getaddrinfo_ex(tsd->hostname, service, &tsd->hints, &tsd->res); @@ -679,7 +679,7 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, hints.ai_family = pf; hints.ai_socktype = conn->socktype; - snprintf(sbuf, sizeof(sbuf), "%d", port); + msnprintf(sbuf, sizeof(sbuf), "%d", port); reslv->start = Curl_now(); /* fire up a new resolver thread! */ |