summaryrefslogtreecommitdiff
path: root/usr/src/lib/libresolv2/common/bsd/strerror.c
diff options
context:
space:
mode:
authorRao Shoaib <Rao.Shoaib@Sun.COM>2009-11-11 08:45:41 -0800
committerRao Shoaib <Rao.Shoaib@Sun.COM>2009-11-11 08:45:41 -0800
commit9525b14bcdeb5b5f6f95ab27c2f48f18bd2ec829 (patch)
treedf51891a276edf456c1481f49653a76cdfedee53 /usr/src/lib/libresolv2/common/bsd/strerror.c
parent0324f02a004039d6377111191fdd7134452d7817 (diff)
downloadillumos-joyent-9525b14bcdeb5b5f6f95ab27c2f48f18bd2ec829.tar.gz
6289479 libresolv2 clean up and alignment with libbind.6.0
Diffstat (limited to 'usr/src/lib/libresolv2/common/bsd/strerror.c')
-rw-r--r--usr/src/lib/libresolv2/common/bsd/strerror.c21
1 files changed, 9 insertions, 12 deletions
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 <sys/param.h>
@@ -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 */