From: wessels <> Date: Wed, 10 Apr 1996 00:20:26 +0000 (+0000) Subject: gindent X-Git-Tag: SQUID_3_0_PRE1~6255 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ba794f4dc77a6d55948074cfaa437df1a6eae52;p=thirdparty%2Fsquid.git gindent --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 47472936ee..b6a5a418b5 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,4 +1,4 @@ -/* $Id: cache_cf.cc,v 1.26 1996/04/09 18:18:46 wessels Exp $ */ +/* $Id: cache_cf.cc,v 1.27 1996/04/09 18:20:26 wessels Exp $ */ /* DEBUG: Section 3 cache_cf: Configuration file parsing */ @@ -135,8 +135,8 @@ static struct { #define DefaultFtpUser "cached@" /* Default without domain */ #define DefaultAnnounceHost "sd.cache.nlanr.net" #define DefaultAnnouncePort 3131 -#define DefaultAnnounceFile (char *)NULL /* default NONE */ -#define DefaultAnnounceRate 86400 /* every 24 hours */ +#define DefaultAnnounceFile (char *)NULL /* default NONE */ +#define DefaultAnnounceRate 86400 /* every 24 hours */ extern char *config_file; @@ -1533,7 +1533,6 @@ int parseConfigFile(file_name) printf(" For this run, however, cached will use %d minutes for clean_rate.\n", (int) (getCleanRate() / 60)); fflush(stdout); /* print message */ } - if (accel_ip_acl == NULL) accel_ip_acl = proxy_ip_acl; diff --git a/src/main.cc b/src/main.cc index 65518a3a7f..50a7e57da2 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,4 +1,4 @@ -/* $Id: main.cc,v 1.24 1996/04/09 18:18:50 wessels Exp $ */ +/* $Id: main.cc,v 1.25 1996/04/09 18:20:28 wessels Exp $ */ /* DEBUG: Section 1 main: startup and main loop */ @@ -320,8 +320,8 @@ int main(argc, argv) } if ((n = getAnnounceRate()) > 0) { if (cached_curtime > last_announce + n) - send_announce(); - last_announce = cached_curtime; + send_announce(); + last_announce = cached_curtime; } /* house keeping */ break; diff --git a/src/send-announce.cc b/src/send-announce.cc index 428b9cf4fd..b3529c5685 100644 --- a/src/send-announce.cc +++ b/src/send-announce.cc @@ -1,7 +1,7 @@ -/* $Id: send-announce.cc,v 1.5 1996/04/09 18:18:50 wessels Exp $ */ +/* $Id: send-announce.cc,v 1.6 1996/04/09 18:20:28 wessels Exp $ */ /* - * DEBUG: Section 27 send-announce + * DEBUG: Section 27 send-announce */ #include "squid.h" @@ -38,24 +38,23 @@ void send_announce() host = getAnnounceHost(); port = getAnnouncePort(); - if ((hp = ipcache_gethostbyname(host))== NULL) { - debug(27,1,"send_announce: Unknown host '%s'\n", host); + if ((hp = ipcache_gethostbyname(host)) == NULL) { + debug(27, 1, "send_announce: Unknown host '%s'\n", host); return; } if ((file = getAnnounceFile())) { /* XXX could block */ fd = file_open(file, NULL, O_RDONLY); - if (fd > -1 && (n = read(fd, sndbuf+l, BUFSIZ-l-1)) > 0); - l += n; - sndbuf[l] = '\0'; + if (fd > -1 && (n = read(fd, sndbuf + l, BUFSIZ - l - 1)) > 0) { + l += n; + sndbuf[l] = '\0'; } else { - debug(27,1,"send_announce: %s: %s\n", file, xstrerror()); + debug(27, 1, "send_announce: %s: %s\n", file, xstrerror()); } } - qdata = (icpUdpData *) xcalloc(1, sizeof(icpUdpData)); qdata->msg = xstrdup(sndbuf); - qdata->len = strlen(sndbuf)+1; + qdata->len = strlen(sndbuf) + 1; qdata->address.sin_family = AF_INET; qdata->address.sin_port = htons(port); memcpy(&qdata->address.sin_addr, hp->h_addr_list[0], hp->h_length); @@ -63,5 +62,5 @@ void send_announce() comm_set_select_handler(theUdpConnection, COMM_SELECT_WRITE, (PF) icpUdpReply, - (void *) qdata); + (void *) qdata); }