]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Returning -1 in the unreached portion of u_short GetService() code results in
authorrousskov <>
Wed, 14 Nov 2007 06:06:01 +0000 (06:06 +0000)
committerrousskov <>
Wed, 14 Nov 2007 06:06:01 +0000 (06:06 +0000)
a type conversion warning.

src/cache_cf.cc

index 681f0f0b5429692645b37dc663652658961ff554..ab9ba3e527ade5135550c7427ceaba8ff90b2e77 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.525 2007/11/12 23:10:37 amosjeffries Exp $
+ * $Id: cache_cf.cc,v 1.526 2007/11/13 23:06:01 rousskov Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -1550,7 +1550,7 @@ GetService(const char *proto)
     char *token = strtok(NULL, w_space);
     if (token == NULL) {
        self_destruct();
-       return -1; /* NEVER REACHED */
+       return 0; /* NEVER REACHED */
     }
     /** Returns either the service port number from /etc/services */
     port = getservbyname(token, proto);