-/* $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 */
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)