From a0c4fc46b9c9df1c815588c23264eb3840604231 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Wed, 3 May 2017 17:05:59 +1000 Subject: [PATCH] Remove long-dead snprintf compat code These bogus compat implementations of snprintf() and vsnprintf() have long been superseded by the proper implementations in the same file. --- source/compat.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/source/compat.c b/source/compat.c index d5beedf..3dafb3d 100644 --- a/source/compat.c +++ b/source/compat.c @@ -1255,33 +1255,6 @@ int inet_aton(const char *cp, struct in_addr *addr) /* --- end of inet_aton.c --- */ /* --- start of misc stuff --- */ -#if 0 -int vsnprintf (char *str, size_t size, const char *format, va_list ap) -{ - int ret = vsprintf(str, format, ap); - - /* If the string ended up overflowing, just give up. */ - if (ret == (int)str && strlen(str) > size) - ircpanic("Buffer overflow in vsnprintf"); - if (ret != (int)str && ret > size) - ircpanic("Buffer overflow in vsnprintf"); - - return ret; -} -#endif - -#if 0 -int snprintf (char *str, size_t size, const char *format, ...) -{ - int ret; - va_list args; - - va_start(args, format); - ret = vsnprintf(str, size, format, args); - va_end(args); - return ret; -} -#endif /*