From: wessels <> Date: Mon, 8 Apr 1996 22:01:05 +0000 (+0000) Subject: use integer flag for init X-Git-Tag: SQUID_3_0_PRE1~6268 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c7f37efb50eb89ece75ef37b3176254e55419be4;p=thirdparty%2Fsquid.git use integer flag for init --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index c7ea22d5cb..d954f9aa68 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,4 +1,4 @@ -/* $Id: cache_cf.cc,v 1.20 1996/04/06 00:53:03 wessels Exp $ */ +/* $Id: cache_cf.cc,v 1.21 1996/04/08 16:01:05 wessels Exp $ */ /* DEBUG: Section 3 cache_cf: Configuration file parsing */ @@ -181,16 +181,19 @@ ip_access_type ip_access_check(address, list) struct in_addr address; ip_acl *list; { - static struct in_addr localhost = - {}; /* Initialized to all zero */ + static int init = 0; + static struct in_addr localhost; ip_acl *p = NULL; struct in_addr naddr; /* network byte-order IP addr */ if (!list) return IP_ALLOW; - if (!localhost.s_addr) + if (!init) { + memset((char *) &localhost, '\0', sizeof(struct in_addr)); localhost.s_addr = inet_addr("127.0.0.1"); + init = 1; + } naddr.s_addr = address.s_addr; if (naddr.s_addr == localhost.s_addr)