diff options
author | monty@narttu.mysql.fi <> | 2003-04-03 13:08:28 +0300 |
---|---|---|
committer | monty@narttu.mysql.fi <> | 2003-04-03 13:08:28 +0300 |
commit | 8f957e6ab5fd649065454e7c64ff8b113ad1e5ca (patch) | |
tree | 0365c7e0ef038809d3d327a8ba3b4040b47854e2 /mysys/my_vsnprintf.c | |
parent | 618857b6eb6e7982bb1f8833f6043909dee092b6 (diff) | |
parent | e96c75fec073db2ef9af59c01634551ed9ea5fd4 (diff) | |
download | mariadb-git-8f957e6ab5fd649065454e7c64ff8b113ad1e5ca.tar.gz |
Merge narttu.mysql.fi:/my/mysql-3.23 into narttu.mysql.fi:/my/mysql-4.0
Diffstat (limited to 'mysys/my_vsnprintf.c')
-rw-r--r-- | mysys/my_vsnprintf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mysys/my_vsnprintf.c b/mysys/my_vsnprintf.c index 7490ab4a9f2..e49b1d0e729 100644 --- a/mysys/my_vsnprintf.c +++ b/mysys/my_vsnprintf.c @@ -23,11 +23,15 @@ int my_snprintf(char* to, size_t n, const char* fmt, ...) { + int result; va_list args; va_start(args,fmt); - return my_vsnprintf(to, n, fmt, args); + result= my_vsnprintf(to, n, fmt, args); + va_end(args); + return result; } + int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap) { char *start=to, *end=to+n-1; @@ -79,6 +83,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap) return (uint) (to - start); } + #ifdef MAIN #define OVERRUN_SENTRY 250 static void my_printf(const char * fmt, ...) @@ -99,6 +104,7 @@ static void my_printf(const char * fmt, ...) va_end(ar); } + int main() { |