From: wessels <> Date: Wed, 1 Dec 1999 11:25:59 +0000 (+0000) Subject: if errno is unknown (such that there is no string description) X-Git-Tag: SQUID_3_0_PRE1~2110 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=23305699c3628297340c4164a8e66942fe0adedc;p=thirdparty%2Fsquid.git if errno is unknown (such that there is no string description) then at least print the errno value. --- diff --git a/lib/util.c b/lib/util.c index 6c4b07d3b2..8f34a8182e 100644 --- a/lib/util.c +++ b/lib/util.c @@ -1,6 +1,6 @@ /* - * $Id: util.c,v 1.67 1999/05/04 21:20:43 wessels Exp $ + * $Id: util.c,v 1.68 1999/12/01 04:25:59 wessels Exp $ * * DEBUG: * AUTHOR: Harvest Derived @@ -603,8 +603,9 @@ xstrerror(void) { static char xstrerror_buf[BUFSIZ]; if (errno < 0 || errno >= sys_nerr) - return ("Unknown"); - snprintf(xstrerror_buf, BUFSIZ, "(%d) %s", errno, strerror(errno)); + snprintf(xstrerror_buf, BUFSIZ, "(%d) Unknown", errno); + else + snprintf(xstrerror_buf, BUFSIZ, "(%d) %s", errno, strerror(errno)); return xstrerror_buf; }