summaryrefslogtreecommitdiff
path: root/lib/mprintf.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-05-22 13:58:17 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-05-22 13:59:29 +0200
commit8589e1fe30773e10c50b9a65d4f96eeb8434233c (patch)
treeabd3ef9c42c4c8a84f8071933e747e46d4da35b6 /lib/mprintf.c
parentfab9629133025e2d9517334535908200802b5e96 (diff)
downloadcurl-8589e1fe30773e10c50b9a65d4f96eeb8434233c.tar.gz
assert: avoid, use DEBUGASSERT instead!
... as it does extra checks to actually work. Reported-by: jonrumsey at github Fixes #1504
Diffstat (limited to 'lib/mprintf.c')
-rw-r--r--lib/mprintf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/mprintf.c b/lib/mprintf.c
index 037132c86..eb7ee0c6b 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1999 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1999 - 2017, 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
@@ -951,9 +951,7 @@ static int dprintf_formatf(
/* NOTE NOTE NOTE!! Not all sprintf implementations return number of
output characters */
(sprintf)(work, formatbuf, p->data.dnum);
-#ifdef CURLDEBUG
- assert(strlen(work) <= sizeof(work));
-#endif
+ DEBUGASSERT(strlen(work) <= sizeof(work));
for(fptr=work; *fptr; fptr++)
OUTCHAR(*fptr);
}