]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
if errno is unknown (such that there is no string description)
authorwessels <>
Wed, 1 Dec 1999 11:25:59 +0000 (11:25 +0000)
committerwessels <>
Wed, 1 Dec 1999 11:25:59 +0000 (11:25 +0000)
then at least print the errno value.

lib/util.c

index 6c4b07d3b20b2a514678aa4103bf7c1eddd445a9..8f34a8182edf6214a77a2cc281404c3074994c83 100644 (file)
@@ -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;
 }