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
This commit is contained in:
Andreas Gustafsson
2001-11-20 01:45:49 +00:00
parent 17453368fa
commit 945f7311ca
4 changed files with 8 additions and 13 deletions
+2 -3
View File
@@ -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
+2 -4
View File
@@ -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 <config.h>
@@ -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
}
+2 -3
View File
@@ -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
+2 -3
View File
@@ -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 <config.h>
@@ -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);
}
/*