From: rousskov <> Date: Wed, 14 Nov 2007 06:06:01 +0000 (+0000) Subject: Returning -1 in the unreached portion of u_short GetService() code results in X-Git-Tag: SQUID_3_0_STABLE1~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f6161ddeea6d38bfedb9253d352f59345d48c66;p=thirdparty%2Fsquid.git Returning -1 in the unreached portion of u_short GetService() code results in a type conversion warning. --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 681f0f0b54..ab9ba3e527 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -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);