diff options
author | Stefan Weil <weil@mail.berlios.de> | 2010-11-15 21:15:26 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-11-21 09:16:57 -0600 |
commit | 9eca6cc64392b4ad8bd8723e840f491fa36524ad (patch) | |
tree | 3664ee6df6d810f19b738c1ba3114efd7bc16fb7 /slirp/misc.c | |
parent | 0550f9c1b58896a6ca1d1256e26c78f84de2ed55 (diff) |
slirp: Remove unused code for bad sprintf
Neither DECLARE_SPRINTF nor BAD_SPRINTF are needed for QEMU.
QEMU won't support systems with missing or bad declarations
for sprintf. The unused code was detected while looking for
functions with missing format checking. Instead of adding
GCC_FMT_ATTR, the unused code was removed.
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'slirp/misc.c')
-rw-r--r-- | slirp/misc.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/slirp/misc.c b/slirp/misc.c index 1aeb401082..19dbec491f 100644 --- a/slirp/misc.c +++ b/slirp/misc.c @@ -264,48 +264,6 @@ void lprint(const char *format, ...) va_end(args); } -#ifdef BAD_SPRINTF - -#undef vsprintf -#undef sprintf - -/* - * Some BSD-derived systems have a sprintf which returns char * - */ - -int -vsprintf_len(string, format, args) - char *string; - const char *format; - va_list args; -{ - vsprintf(string, format, args); - return strlen(string); -} - -int -#ifdef __STDC__ -sprintf_len(char *string, const char *format, ...) -#else -sprintf_len(va_alist) va_dcl -#endif -{ - va_list args; -#ifdef __STDC__ - va_start(args, format); -#else - char *string; - char *format; - va_start(args); - string = va_arg(args, char *); - format = va_arg(args, char *); -#endif - vsprintf(string, format, args); - return strlen(string); -} - -#endif - void u_sleep(int usec) { |