From 9525b14bcdeb5b5f6f95ab27c2f48f18bd2ec829 Mon Sep 17 00:00:00 2001 From: Rao Shoaib Date: Wed, 11 Nov 2009 08:45:41 -0800 Subject: 6289479 libresolv2 clean up and alignment with libbind.6.0 --- usr/src/lib/libresolv2/common/bsd/strerror.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'usr/src/lib/libresolv2/common/bsd/strerror.c') diff --git a/usr/src/lib/libresolv2/common/bsd/strerror.c b/usr/src/lib/libresolv2/common/bsd/strerror.c index 4d650edfc1..5973e63d5b 100644 --- a/usr/src/lib/libresolv2/common/bsd/strerror.c +++ b/usr/src/lib/libresolv2/common/bsd/strerror.c @@ -1,11 +1,6 @@ -/* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: strerror.c,v 8.7 2001/08/28 11:48:10 marka Exp $"; +static const char rcsid[] = "$Id: strerror.c,v 1.6 2008/02/18 03:49:08 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -41,8 +36,6 @@ static const char rcsid[] = "$Id: strerror.c,v 8.7 2001/08/28 11:48:10 marka Exp * SUCH DAMAGE. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "port_before.h" #include @@ -64,19 +57,21 @@ extern char *sys_errlist[]; const char * isc_strerror(int num) { #define UPREFIX "Unknown error: " - static char ebuf[40] = UPREFIX; /* 64-bit number + slop */ + static char ebuf[40] = UPREFIX; /*%< 64-bit number + slop */ u_int errnum; char *p, *t; +#ifndef USE_SYSERROR_LIST const char *ret; +#endif char tmp[40]; - errnum = num; /* convert to unsigned */ + errnum = num; /*%< convert to unsigned */ #ifdef USE_SYSERROR_LIST - if (errnum < sys_nerr) + if (errnum < (u_int)sys_nerr) return (sys_errlist[errnum]); #else #undef strerror - ret = strerror(num); /* call strerror() in libc */ + ret = strerror(num); /*%< call strerror() in libc */ if (ret != NULL) return(ret); #endif @@ -95,3 +90,5 @@ isc_strerror(int num) { } #endif /*NEED_STRERROR*/ + +/*! \file */ -- cgit v1.2.3