From 945f7311ca5ae0005676e3c4e02c712d6f8e7eaf Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 20 Nov 2001 01:45:49 +0000 Subject: [PATCH] Don't return a value from isc__strerror(); it was never used, and casting it to void everywhere as required by the coding standards would have been silly and pointless --- lib/isc/unix/include/isc/strerror.h | 5 ++--- lib/isc/unix/strerror.c | 6 ++---- lib/isc/win32/include/isc/strerror.h | 5 ++--- lib/isc/win32/strerror.c | 5 ++--- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/lib/isc/unix/include/isc/strerror.h b/lib/isc/unix/include/isc/strerror.h index 0471adb539..ca428af955 100644 --- a/lib/isc/unix/include/isc/strerror.h +++ b/lib/isc/unix/include/isc/strerror.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: strerror.h,v 1.2 2001/08/31 05:57:58 marka Exp $ */ +/* $Id: strerror.h,v 1.3 2001/11/20 01:45:47 gson Exp $ */ #ifndef ISC_STRERROR_H #define ISC_STRERROR_H @@ -30,12 +30,11 @@ ISC_LANG_BEGINDECLS /* * Provide a thread safe wrapper to strerrror(). - * 'buf' is always returned. * * Requires: * 'buf' to be non NULL. */ -char * +void isc__strerror(int num, char *buf, size_t bufsize); ISC_LANG_ENDDECLS diff --git a/lib/isc/unix/strerror.c b/lib/isc/unix/strerror.c index 13ef3ba431..4a0f8d80ca 100644 --- a/lib/isc/unix/strerror.c +++ b/lib/isc/unix/strerror.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: strerror.c,v 1.2 2001/10/22 22:17:30 gson Exp $ */ +/* $Id: strerror.c,v 1.3 2001/11/20 01:45:45 gson Exp $ */ #include @@ -41,7 +41,7 @@ extern const char * const sys_errlist[]; extern const int sys_nerr; #endif -char * +void isc__strerror(int num, char *buf, size_t size) { #ifdef HAVE_STRERROR char *msg; @@ -59,7 +59,6 @@ isc__strerror(int num, char *buf, size_t size) { else snprintf(buf, size, "Unknown error: %u", unum); UNLOCK(&isc_strerror_lock); - return (buf); #else unsigned int unum = num; @@ -69,6 +68,5 @@ isc__strerror(int num, char *buf, size_t size) { snprintf(buf, size, "%s", sys_errlist[num]); else snprintf(buf, size, "Unknown error: %u", unum); - return (buf); #endif } diff --git a/lib/isc/win32/include/isc/strerror.h b/lib/isc/win32/include/isc/strerror.h index 9c095f7210..37396816de 100644 --- a/lib/isc/win32/include/isc/strerror.h +++ b/lib/isc/win32/include/isc/strerror.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: strerror.h,v 1.1 2001/09/04 03:22:23 mayer Exp $ */ +/* $Id: strerror.h,v 1.2 2001/11/20 01:45:49 gson Exp $ */ #ifndef ISC_STRERROR_H #define ISC_STRERROR_H @@ -30,12 +30,11 @@ ISC_LANG_BEGINDECLS /* * Provide a thread safe wrapper to strerrror(). - * 'buf' is always returned. * * Requires: * 'buf' to be non NULL. */ -char * +void isc__strerror(int num, char *buf, size_t bufsize); ISC_LANG_ENDDECLS diff --git a/lib/isc/win32/strerror.c b/lib/isc/win32/strerror.c index a3345d1d53..54b67dcf4a 100644 --- a/lib/isc/win32/strerror.c +++ b/lib/isc/win32/strerror.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: strerror.c,v 1.1 2001/09/04 03:22:23 mayer Exp $ */ +/* $Id: strerror.c,v 1.2 2001/11/20 01:45:48 gson Exp $ */ #include @@ -59,7 +59,7 @@ static void init_lock(void) { * if that routine gets used. */ -char * +void isc__strerror(int num, char *buf, size_t size) { char *msg; unsigned int unum = num; @@ -81,7 +81,6 @@ isc__strerror(int num, char *buf, size_t size) { freebuf = FALSE; } UNLOCK(&isc_strerror_lock); - return (buf); } /*