summaryrefslogtreecommitdiff
path: root/dbug
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@sun.com>2009-11-27 15:40:33 +0100
committerTor Didriksen <tor.didriksen@sun.com>2009-11-27 15:40:33 +0100
commit1574c6d081a702ed037834b3d090e9f6d9fd2c0d (patch)
treec4ed674ab8281a619b96eb61a8852bfc45e84785 /dbug
parent17a5964999980e3771c281362e26540ac3808593 (diff)
downloadmariadb-git-1574c6d081a702ed037834b3d090e9f6d9fd2c0d.tar.gz
Use vsnprintf() rather than my_vsnprintf() in DbugVfprintf,
since support for "%g" and "%f" has not been backported yet. dbug/dbug.c: Use vsnprintf rather than my_vsnprintf.
Diffstat (limited to 'dbug')
-rw-r--r--dbug/dbug.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c
index 0a0c56170fa..9bcea988b33 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -1355,14 +1355,18 @@ void _db_doprnt_(const char *format,...)
}
/*
+ * This function is intended as a
* vfprintf clone with consistent, platform independent output for
* problematic formats like %p, %zd and %lld.
+ * However: full functionality for my_vsnprintf has not been backported yet,
+ * so code using "%g" or "%f" will have undefined behaviour.
*/
static void DbugVfprintf(FILE *stream, const char* format, va_list args)
{
char cvtbuf[1024];
size_t len;
- len = my_vsnprintf(cvtbuf, sizeof(cvtbuf), format, args);
+ // Do not use my_vsnprintf, it does not support "%g".
+ len = vsnprintf(cvtbuf, sizeof(cvtbuf), format, args);
(void) fprintf(stream, "%s\n", cvtbuf);
}