diff options
author | unknown <bar@bar.mysql.r18.ru> | 2002-11-13 15:00:25 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2002-11-13 15:00:25 +0400 |
commit | a464676f64a4a6e61f17b75c6ec1693ac948b303 (patch) | |
tree | c27e6e07a7d7d44e763a8aa46e12fe325051dd9b /strings | |
parent | cc19c18cf730bec5ca5631c7399f66678728782b (diff) | |
download | mariadb-git-a464676f64a4a6e61f17b75c6ec1693ac948b303.tar.gz |
my_snprintf() doesn't support things like %04X so use vsprintf() instead
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-simple.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 9fef27cad10..3393ed09ee0 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -123,6 +123,7 @@ int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, } +#ifdef NOT_USED static int my_vsnprintf_8bit(char *to, size_t n, const char* fmt, va_list ap) { char *start=to, *end=to+n-1; @@ -173,14 +174,22 @@ static int my_vsnprintf_8bit(char *to, size_t n, const char* fmt, va_list ap) *to='\0'; /* End of errmessage */ return (uint) (to - start); } - +#endif int my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)), - char* to, uint n, const char* fmt, ...) + char* to, uint n __attribute__((unused)), + const char* fmt, ...) { va_list args; va_start(args,fmt); +#ifdef NOT_USED return my_vsnprintf_8bit(to, n, fmt, args); +#endif + /* + FIXME: generally not safe, but it is OK for now + FIXME: as far as it's not called unsafely in the current code + */ + return vsprintf(to,fmt,args); /* FIXME */ } |