From 34436c09619d6b211672301cc68b125bb8548a09 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 2 Feb 2002 11:00:37 +0000 Subject: Grr. I should learn to compile stuff before committing --- libc/inet/herror.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'libc/inet/herror.c') diff --git a/libc/inet/herror.c b/libc/inet/herror.c index cb89be18b..79b84084f 100644 --- a/libc/inet/herror.c +++ b/libc/inet/herror.c @@ -23,8 +23,7 @@ #include #include -#ifdef L_herror - +static const char *error_msg = "Resolver error"; static const char *const h_errlist[] = { "Error 0", "Unknown host", /* 1 HOST_NOT_FOUND */ @@ -47,19 +46,16 @@ void herror(const char *s) if (!s || !*s) { c += 2; } - p = "Resolver error"; + p = error_msg; if ((h_errno >= 0) && (h_errno < h_nerr)) { p = h_errlist[h_errno]; } fprintf(stderr, "%s%s%s\n", s, c, p); } -#endif -#ifdef L_hstrerror const char *hstrerror(int err) { - const char *error_msg = "Resolver error"; if (err < 0) { return(error_msg); } else if (err < h_nerr) { @@ -67,4 +63,3 @@ const char *hstrerror(int err) } return(error_msg); } -#endif -- cgit v1.2.3