aboutsummaryrefslogtreecommitdiff
path: root/lib/curl_printf.h
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 /lib/curl_printf.h
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 'lib/curl_printf.h')
-rw-r--r--lib/curl_printf.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/curl_printf.h b/lib/curl_printf.h
index 49857cdb0..0d37b8e57 100644
--- a/lib/curl_printf.h
+++ b/lib/curl_printf.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -31,7 +31,7 @@
# undef printf
# undef fprintf
-# undef snprintf
+# undef msnprintf
# undef vprintf
# undef vfprintf
# undef vsnprintf
@@ -39,18 +39,10 @@
# undef vaprintf
# define printf curl_mprintf
# define fprintf curl_mfprintf
-# define snprintf curl_msnprintf
+# define msnprintf curl_msnprintf
# define vprintf curl_mvprintf
# define vfprintf curl_mvfprintf
-# define vsnprintf curl_mvsnprintf
+# define mvsnprintf curl_mvsnprintf
# define aprintf curl_maprintf
# define vaprintf curl_mvaprintf
-
-/* We define away the sprintf functions unconditonally since we don't want
- internal code to be using them, intentionally or by mistake!*/
-# undef sprintf
-# undef vsprintf
-# define sprintf sprintf_was_used
-# define vsprintf vsprintf_was_used
-
#endif /* HEADER_CURL_PRINTF_H */