summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-06-30 06:43:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-06-30 06:43:49 +0000
commitc36ef4ea79422c0bacfa02bbd338fae6711cafce (patch)
treeb791da192b341110babbf569445b4f54513bef90
parent3254368b53796d26765e130a73406abf76584046 (diff)
indent
-rw-r--r--lib/libc/net/gai_strerror.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/lib/libc/net/gai_strerror.c b/lib/libc/net/gai_strerror.c
index 37e0b55e8b0..c701c8f4224 100644
--- a/lib/libc/net/gai_strerror.c
+++ b/lib/libc/net/gai_strerror.c
@@ -1,7 +1,7 @@
/*
* %%% copyright-cmetz-97-bsd
* Copyright (c) 1997-1999, Craig Metz, All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -17,7 +17,7 @@
* 4. Neither the name of the author nor the names of contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -29,7 +29,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
*/
/* gai_strerror() v1.38 */
@@ -38,34 +37,35 @@
#include <netdb.h>
#include <errno.h>
-char *gai_strerror(int errnum)
+char *
+gai_strerror(int errnum)
{
- switch(errnum) {
- case 0:
- return "no error";
- case EAI_BADFLAGS:
- return "invalid value for ai_flags";
- case EAI_NONAME:
- return "name or service is not known";
- case EAI_AGAIN:
- return "temporary failure in name resolution";
- case EAI_FAIL:
- return "non-recoverable failure in name resolution";
- case EAI_NODATA:
- return "no address associated with name";
- case EAI_FAMILY:
- return "ai_family not supported";
- case EAI_SOCKTYPE:
- return "ai_socktype not supported";
- case EAI_SERVICE:
- return "service not supported for ai_socktype";
- case EAI_ADDRFAMILY:
- return "address family for name not supported";
- case EAI_MEMORY:
- return "memory allocation failure";
- case EAI_SYSTEM:
- return "system error";
- default:
- return "unknown/invalid error";
- };
-};
+ switch (errnum) {
+ case 0:
+ return "no error";
+ case EAI_BADFLAGS:
+ return "invalid value for ai_flags";
+ case EAI_NONAME:
+ return "name or service is not known";
+ case EAI_AGAIN:
+ return "temporary failure in name resolution";
+ case EAI_FAIL:
+ return "non-recoverable failure in name resolution";
+ case EAI_NODATA:
+ return "no address associated with name";
+ case EAI_FAMILY:
+ return "ai_family not supported";
+ case EAI_SOCKTYPE:
+ return "ai_socktype not supported";
+ case EAI_SERVICE:
+ return "service not supported for ai_socktype";
+ case EAI_ADDRFAMILY:
+ return "address family for name not supported";
+ case EAI_MEMORY:
+ return "memory allocation failure";
+ case EAI_SYSTEM:
+ return "system error";
+ default:
+ return "unknown/invalid error";
+ }
+}