aboutsummaryrefslogtreecommitdiff
path: root/src/tool_dirhie.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-11-22 09:01:24 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-11-23 08:26:51 +0100
commitdcd6f810255785d52b89150e18460fb0899d4f7e (patch)
treec3cb7cdcb79dbf752edcd997934e44a2e9998397 /src/tool_dirhie.c
parent9944d6ba334f07b0b6199bdb5bb82091c88c16ed (diff)
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 'src/tool_dirhie.c')
-rw-r--r--src/tool_dirhie.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tool_dirhie.c b/src/tool_dirhie.c
index 24bbc4906..06b3c03e8 100644
--- a/src/tool_dirhie.c
+++ b/src/tool_dirhie.c
@@ -131,13 +131,13 @@ CURLcode create_dir_hierarchy(const char *outfile, FILE *errors)
if(tempdir2 != NULL) {
size_t dlen = strlen(dirbuildup);
if(dlen)
- snprintf(&dirbuildup[dlen], outlen - dlen, "%s%s", DIR_CHAR, tempdir);
+ msnprintf(&dirbuildup[dlen], outlen - dlen, "%s%s", DIR_CHAR, tempdir);
else {
if(outdup == tempdir)
/* the output string doesn't start with a separator */
strcpy(dirbuildup, tempdir);
else
- snprintf(dirbuildup, outlen, "%s%s", DIR_CHAR, tempdir);
+ msnprintf(dirbuildup, outlen, "%s%s", DIR_CHAR, tempdir);
}
if((-1 == mkdir(dirbuildup, (mode_t)0000750)) && (errno != EEXIST)) {
show_dir_errno(errors, dirbuildup);