summaryrefslogtreecommitdiff
path: root/strings/my_vsnprintf.c
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-08-24 17:24:23 +0200
committerunknown <serg@serg.mylan>2004-08-24 17:24:23 +0200
commita49c12f5152791042eeecac19db9054ad845e3dd (patch)
tree35c94403332fed86012546db775d8817473f7435 /strings/my_vsnprintf.c
parent62a63815e119807134de74edb78e478b75a6b874 (diff)
parent9d1a9d72cba1aa828e631f520540411d7508a4e0 (diff)
downloadmariadb-git-a49c12f5152791042eeecac19db9054ad845e3dd.tar.gz
manually merged
BitKeeper/etc/logging_ok: auto-union mysql-test/r/binary.result: Auto merged mysql-test/r/truncate.result: Auto merged mysql-test/t/binary.test: Auto merged mysql-test/t/truncate.test: Auto merged mysys/my_lib.c: Auto merged strings/my_vsnprintf.c: Auto merged support-files/Makefile.am: Auto merged
Diffstat (limited to 'strings/my_vsnprintf.c')
-rw-r--r--strings/my_vsnprintf.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c
index 71b5f345fda..268f7d18f2a 100644
--- a/strings/my_vsnprintf.c
+++ b/strings/my_vsnprintf.c
@@ -33,17 +33,6 @@
length of result string
*/
-int my_snprintf(char* to, size_t n, const char* fmt, ...)
-{
- int result;
- va_list args;
- va_start(args,fmt);
- 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;
@@ -141,6 +130,15 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
return (uint) (to - start);
}
+int my_snprintf(char* to, size_t n, const char* fmt, ...)
+{
+ int result;
+ va_list args;
+ va_start(args,fmt);
+ result= my_vsnprintf(to, n, fmt, args);
+ va_end(args);
+ return result;
+}
#ifdef MAIN
#define OVERRUN_SENTRY 250