From: wessels <> Date: Tue, 17 Sep 1996 22:32:20 +0000 (+0000) Subject: From: Markus Gyger X-Git-Tag: SQUID_3_0_PRE1~5774 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=86ee201799c54b2e83133c514e4574b5afe630b5;p=thirdparty%2Fsquid.git From: Markus Gyger ============================================================================== > The most important change to this version is the switch to ANSI-style > coding. Great! Here are some diffs to keep my picky ISO C compiler more silent. --- diff --git a/ChangeLog b/ChangeLog index 69ac6d0d08..59b4a5594a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Changes to squid-1.1.beta3 (): + + - s/()/(void)/ + - Fixed 8k page leak in icmpRecv(). + Changes to squid-1.1.beta2 (September 16, 1996): - Switched to ANSI style coding. diff --git a/include/version.h b/include/version.h index 135534480c..41ca162ef0 100644 --- a/include/version.h +++ b/include/version.h @@ -1,9 +1,9 @@ -/* $Id: version.h,v 1.41 1996/09/14 16:55:26 wessels Exp $ +/* $Id: version.h,v 1.42 1996/09/17 16:32:25 wessels Exp $ * * SQUID_VERSION - String for version id of this distribution */ #ifndef SQUID_VERSION -#define SQUID_VERSION "1.1.beta2" +#define SQUID_VERSION "1.1.beta3" #endif #ifndef SQUID_RELEASE_TIME diff --git a/lib/rfc1738.c b/lib/rfc1738.c index e334bd4955..cd38939232 100644 --- a/lib/rfc1738.c +++ b/lib/rfc1738.c @@ -1,5 +1,5 @@ /* - * $Id: rfc1738.c,v 1.4 1996/09/14 08:50:50 wessels Exp $ + * $Id: rfc1738.c,v 1.5 1996/09/17 16:32:26 wessels Exp $ * * DEBUG: * AUTHOR: Harvest Derived @@ -161,7 +161,7 @@ rfc1738_escape(char *url) } } /* RFC 1738 says any control chars (0x00-0x1F) are encoded */ - if (*p <= (char) 0x1F) { + if ((unsigned char) *p <= (unsigned char) 0x1F) { do_escape = 1; } /* RFC 1738 says 0x7f is encoded */ @@ -169,7 +169,8 @@ rfc1738_escape(char *url) do_escape = 1; } /* RFC 1738 says any non-US-ASCII are encoded */ - if ((*p >= (char) 0x80) && (*p <= (char) 0xFF)) { + if (((unsigned char) *p >= (unsigned char) 0x80) && + ((unsigned char) *p <= (unsigned char) 0xFF)) { do_escape = 1; } /* Do the triplet encoding, or just copy the char */ diff --git a/scripts/cache-compare.pl b/scripts/cache-compare.pl index edc4cc1d3f..c14523176f 100755 --- a/scripts/cache-compare.pl +++ b/scripts/cache-compare.pl @@ -19,10 +19,10 @@ # BUGS: # Should probably cache the gethostbyname() calls. -@getfrom = ('SOURCE', 'localhost:3128'); +@getfrom = ('SOURCE', 'localhost:3128', 'bo:3128'); require 'sys/socket.ph'; -$gettimeofday = 116; # cheating, should use require syscall.ph +$gettimeofday = 1128; # cheating, should use require syscall.ph while (<>) { chop ($url = $_); diff --git a/src/acl.cc b/src/acl.cc index a12a31bfc6..5b155def6b 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,5 +1,5 @@ /* - * $Id: acl.cc,v 1.40 1996/09/17 02:29:48 wessels Exp $ + * $Id: acl.cc,v 1.41 1996/09/17 16:32:31 wessels Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -173,7 +173,7 @@ decode_addr(char *asc, struct in_addr *addr, struct in_addr *mask) break; case 1: /* a significant bits value for a mask */ if (a1 >= 0 && a1 < 33) { - addr->s_addr = htonl(0xffffffff << (32 - a1)); + addr->s_addr = htonl(0xfffffffful << (32 - a1)); break; } default: @@ -192,16 +192,16 @@ decode_addr(char *asc, struct in_addr *addr, struct in_addr *mask) /* Guess netmask */ a = ntohl(addr->s_addr); - if (!(a & 0xFFFFFFFF)) - mask->s_addr = htonl(0x00000000); + if (!(a & 0xFFFFFFFFul)) + mask->s_addr = htonl(0x00000000ul); else if (!(a & 0x00FFFFFF)) - mask->s_addr = htonl(0xFF000000); + mask->s_addr = htonl(0xFF000000ul); else if (!(a & 0x0000FFFF)) - mask->s_addr = htonl(0xFFFF0000); + mask->s_addr = htonl(0xFFFF0000ul); else if (!(a & 0x000000FF)) - mask->s_addr = htonl(0xFFFFFF00); + mask->s_addr = htonl(0xFFFFFF00ul); else - mask->s_addr = htonl(0xFFFFFFFF); + mask->s_addr = htonl(0xFFFFFFFFul); addr->s_addr &= mask->s_addr; /* 1.2.3.4/255.255.255.0 --> 1.2.3.0 */ } diff --git a/src/cache_cf.cc b/src/cache_cf.cc index aa79160ed3..bd14ccf2a9 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,5 +1,5 @@ /* - * $Id: cache_cf.cc,v 1.90 1996/09/17 02:29:50 wessels Exp $ + * $Id: cache_cf.cc,v 1.91 1996/09/17 16:32:32 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -190,7 +190,7 @@ struct SquidConfig Config; #define DefaultTcpOutgoingAddr INADDR_NONE #define DefaultUdpIncomingAddr INADDR_ANY #define DefaultUdpOutgoingAddr INADDR_NONE -#define DefaultClientNetmask 0xFFFFFFFF +#define DefaultClientNetmask 0xFFFFFFFFul #define DefaultSslProxyPort 0 #define DefaultSslProxyHost (char *)NULL #define DefaultIpcacheSize 1024 @@ -351,15 +351,15 @@ addToIPACL(ip_acl ** list, char *ip_str, ip_access_type access) switch (c) { case 4: if (a1 == 0 && a2 == 0 && a3 == 0 && a4 == 0) /* world */ - lmask.s_addr = 0x00000000; + lmask.s_addr = 0x00000000ul; else if (a2 == 0 && a3 == 0 && a4 == 0) /* class A */ - lmask.s_addr = htonl(0xff000000); + lmask.s_addr = htonl(0xff000000ul); else if (a3 == 0 && a4 == 0) /* class B */ - lmask.s_addr = htonl(0xffff0000); + lmask.s_addr = htonl(0xffff0000ul); else if (a4 == 0) /* class C */ - lmask.s_addr = htonl(0xffffff00); + lmask.s_addr = htonl(0xffffff00ul); else - lmask.s_addr = 0xffffffff; + lmask.s_addr = 0xfffffffful; break; case 5: @@ -368,7 +368,7 @@ addToIPACL(ip_acl ** list, char *ip_str, ip_access_type access) ip_str); return; } - lmask.s_addr = htonl(0xffffffff << (32 - m1)); + lmask.s_addr = htonl(0xfffffffful << (32 - m1)); break; case 8: diff --git a/src/client_side.cc b/src/client_side.cc index 3f4d74b32b..5a4e2d8fe9 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.29 1996/09/17 02:29:51 wessels Exp $ + * $Id: client_side.cc,v 1.30 1996/09/17 16:32:34 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -225,7 +225,7 @@ clientRedirectDone(void *data, char *result) #define CHECK_PROXY_FILE_TIME 300 char * -proxyAuthenticate(void) +proxyAuthenticate(char *headers) { /* Keep the time measurements and the hash * table of users and passwords handy */ diff --git a/src/comm.cc b/src/comm.cc index 180df7da3d..3c008bd724 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.73 1996/09/17 02:29:52 wessels Exp $ + * $Id: comm.cc,v 1.74 1996/09/17 16:32:35 wessels Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -1328,7 +1328,7 @@ commHandleWrite(int fd, RWStateData * state) /* Select for Writing on FD, until SIZE bytes are sent. Call * * HANDLER when complete. */ void -comm_write(int fd, char *buf, int size, int timeout, rw_complete_handler * handler, void *handler_data, void (*free) (void *)) +comm_write(int fd, char *buf, int size, int timeout, rw_complete_handler * handler, void *handler_data, void (*free_func) (void *)) { RWStateData *state = NULL; @@ -1347,7 +1347,7 @@ comm_write(int fd, char *buf, int size, int timeout, rw_complete_handler * handl state->timeout = timeout; state->time = squid_curtime; state->handler_data = handler_data; - state->free = free; + state->free = free_func; fd_table[fd].rwstate = state; comm_set_select_handler(fd, COMM_SELECT_WRITE, diff --git a/src/debug.cc b/src/debug.cc index ead56201b0..84f5e5b444 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -1,5 +1,5 @@ /* - * $Id: debug.cc,v 1.24 1996/09/17 02:29:52 wessels Exp $ + * $Id: debug.cc,v 1.25 1996/09/17 16:32:36 wessels Exp $ * * DEBUG: section 0 Debug Routines * AUTHOR: Harvest Derived @@ -105,8 +105,8 @@ #include "squid.h" -char *_db_file = __FILE__; -int _db_line = 0; +char *volatile _db_file = __FILE__; +volatile int _db_line = 0; FILE *debug_log = NULL; static char *debug_log_file = NULL; diff --git a/src/disk.cc b/src/disk.cc index 1179fca59d..b39537b1a9 100644 --- a/src/disk.cc +++ b/src/disk.cc @@ -1,5 +1,5 @@ /* - * $Id: disk.cc,v 1.26 1996/09/17 02:29:53 wessels Exp $ + * $Id: disk.cc,v 1.27 1996/09/17 16:32:37 wessels Exp $ * * DEBUG: section 6 Disk I/O Routines * AUTHOR: Harvest Derived @@ -338,7 +338,7 @@ file_write(int fd, int access_code, void (*handle) (), void *handle_data, - void (*free) (void *)) + void (*free_func) (void *)) { dwrite_q *wq = NULL; @@ -355,7 +355,7 @@ file_write(int fd, wq->len = len; wq->cur_offset = 0; wq->next = NULL; - wq->free = free; + wq->free = free_func; file_table[fd].wrt_handle = handle; file_table[fd].wrt_handle_data = handle_data; diff --git a/src/dns.cc b/src/dns.cc index 93ae445e35..9ad470af16 100644 --- a/src/dns.cc +++ b/src/dns.cc @@ -1,5 +1,5 @@ /* - * $Id: dns.cc,v 1.11 1996/09/17 02:29:54 wessels Exp $ + * $Id: dns.cc,v 1.12 1996/09/17 16:32:38 wessels Exp $ * * DEBUG: section 34 Dnsserver interface * AUTHOR: Harvest Derived @@ -285,7 +285,7 @@ dnsShutdownServers(void) { dnsserver_t *dnsData = NULL; int k; - static char *shutdown = "$shutdown\n"; + static char *shutdown_cmd = "$shutdown\n"; debug(34, 3, "dnsShutdownServers:\n"); @@ -309,8 +309,8 @@ dnsShutdownServers(void) debug(34, 3, "dnsShutdownServers: sending '$shutdown' to dnsserver #%d\n", dnsData->id); debug(34, 3, "dnsShutdownServers: --> FD %d\n", dnsData->outpipe); comm_write(dnsData->outpipe, - xstrdup(shutdown), - strlen(shutdown), + xstrdup(shutdown_cmd), + strlen(shutdown_cmd), 0, /* timeout */ NULL, /* Handler */ NULL, /* Handler-data */ diff --git a/src/errorpage.cc b/src/errorpage.cc index 8ff3de1f77..29d695f56f 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -1,6 +1,6 @@ /* - * $Id: errorpage.cc,v 1.39 1996/09/17 02:29:54 wessels Exp $ + * $Id: errorpage.cc,v 1.40 1996/09/17 16:32:39 wessels Exp $ * * DEBUG: section 4 Error Generation * AUTHOR: Duane Wessels @@ -152,22 +152,22 @@ errorInitialize(void) void squid_error_entry(StoreEntry * entry, log_type type, char *msg) { - int index; + int error_index; if (type < ERR_MIN || type > ERR_MAX) fatal_dump("squid_error_entry: type out of range."); - index = (int) (type - ERR_MIN); - debug(4, 1, "%s: %s\n", ErrorData[index].tag, entry->url); + error_index = (int) (type - ERR_MIN); + debug(4, 1, "%s: %s\n", ErrorData[error_index].tag, entry->url); sprintf(tmp_error_buf, SQUID_ERROR_MSG_P1, entry->url, entry->url, - ErrorData[index].shrt); + ErrorData[error_index].shrt); if (msg) { sprintf(tbuf, SQUID_ERROR_MSG_P2, msg); strcat(tmp_error_buf, tbuf); } sprintf(tbuf, SQUID_ERROR_MSG_P3, - ErrorData[index].lng, + ErrorData[error_index].lng, Config.errHtmlText, appname, version_string, @@ -186,25 +186,25 @@ squid_error_entry(StoreEntry * entry, log_type type, char *msg) char * squid_error_url(char *url, int method, int type, char *address, int code, char *msg) { - int index; + int error_index; *tmp_error_buf = '\0'; if (type < ERR_MIN || type > ERR_MAX) fatal_dump("squid_error_url: type out of range."); - index = (int) (type - ERR_MIN); - debug(4, 1, "%s: %s\n", ErrorData[index].tag, url); + error_index = (int) (type - ERR_MIN); + debug(4, 1, "%s: %s\n", ErrorData[error_index].tag, url); sprintf(tmp_error_buf, "HTTP/1.0 %d Cache Detected Error\r\nContent-type: text/html\r\n\r\n", code); sprintf(tbuf, SQUID_ERROR_MSG_P1, url, url, - ErrorData[index].shrt); + ErrorData[error_index].shrt); strcat(tmp_error_buf, tbuf); if (msg) { sprintf(tbuf, SQUID_ERROR_MSG_P2, msg); strcat(tmp_error_buf, tbuf); } sprintf(tbuf, SQUID_ERROR_MSG_P3, - ErrorData[index].lng, + ErrorData[error_index].lng, Config.errHtmlText, appname, version_string, @@ -233,13 +233,13 @@ Generated by %s/%s@%s\n\ char * squid_error_request(char *request, int type, char *address, int code) { - int index; + int error_index; *tmp_error_buf = '\0'; if (type < ERR_MIN || type > ERR_MAX) fatal_dump("squid_error_request: type out of range."); - index = (int) (type - ERR_MIN); - debug(4, 1, "%s: %s\n", ErrorData[index].tag, request); + error_index = (int) (type - ERR_MIN); + debug(4, 1, "%s: %s\n", ErrorData[error_index].tag, request); sprintf(tmp_error_buf, "HTTP/1.0 %d Cache Detected Error\r\nContent-type: text/html\r\n\r\n", code); sprintf(tbuf, SQUID_REQUEST_ERROR_MSG, request, diff --git a/src/icmp.cc b/src/icmp.cc index 16c88e2648..83d6d94c05 100644 --- a/src/icmp.cc +++ b/src/icmp.cc @@ -1,6 +1,6 @@ /* - * $Id: icmp.cc,v 1.5 1996/09/17 05:16:57 wessels Exp $ + * $Id: icmp.cc,v 1.6 1996/09/17 16:32:40 wessels Exp $ * * DEBUG: section 37 ICMP Routines * AUTHOR: Duane Wessels @@ -174,7 +174,7 @@ icmpSendEcho(struct in_addr to, int opcode, char *payload, int len) int icmp_pktsize = sizeof(struct icmphdr); pkt = get_free_8k_page(); memset(pkt, '\0', 8192); - icmp = (struct icmphdr *) pkt; + icmp = (struct icmphdr *) (void *) pkt; icmp->icmp_type = ICMP_ECHO; icmp->icmp_code = 0; icmp->icmp_cksum = 0; @@ -242,9 +242,9 @@ icmpRecv(int unused1, void *unused2) (struct sockaddr *) &from, &fromlen); debug(37, 9, "icmpRecv: %d bytes from %s\n", n, inet_ntoa(from.sin_addr)); - ip = (struct iphdr *) pkt; + ip = (struct iphdr *) (void *) pkt; iphdrlen = ip->ip_hl << 2; - icmp = (struct icmphdr *) (pkt + iphdrlen); + icmp = (struct icmphdr *) (void *) (pkt + iphdrlen); if (icmp->icmp_type == ICMP_ECHOREPLY) { if (icmp->icmp_id == icmp_ident) { hops = ipHops(ip->ip_ttl); @@ -301,7 +301,7 @@ icmpQueueSend(struct in_addr to, (void *) IcmpQueueHead); } -void +static void icmpSend(int fd, icmpQueueData * queue) { int x; @@ -321,7 +321,7 @@ icmpSend(int fd, icmpQueueData * queue) debug(37, 0, "icmpSend: Wrote %d of %d bytes\n", x, queue->len); } IcmpQueueHead = queue->next; - icmpLog((struct icmphdr *) queue->msg, queue->to.sin_addr, 0, 0); + icmpLog((struct icmphdr *) (void *) queue->msg, queue->to.sin_addr, 0, 0); if (queue->free) queue->free(queue->msg); safe_free(queue); diff --git a/src/ident.cc b/src/ident.cc index 658d859e08..357430fa9d 100644 --- a/src/ident.cc +++ b/src/ident.cc @@ -1,5 +1,5 @@ /* - * $Id: ident.cc,v 1.14 1996/09/16 21:20:47 wessels Exp $ + * $Id: ident.cc,v 1.15 1996/09/17 16:32:41 wessels Exp $ * * DEBUG: section 30 Ident (RFC 931) * AUTHOR: Duane Wessels @@ -47,12 +47,10 @@ void identStart(int sock, icpStateData * icpState) { char *host; - u_short port; LOCAL_ARRAY(char, reqbuf, BUFSIZ); int status; host = inet_ntoa(icpState->peer.sin_addr); - port = ntohs(icpState->peer.sin_port); if (sock < 0) { sock = comm_open(SOCK_STREAM, diff --git a/src/main.cc b/src/main.cc index 17ecb660aa..455f9517e1 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,5 +1,5 @@ /* - * $Id: main.cc,v 1.79 1996/09/17 02:30:00 wessels Exp $ + * $Id: main.cc,v 1.80 1996/09/17 16:32:42 wessels Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -120,9 +120,9 @@ int opt_syslog_enable = 0; /* disabled by default */ int opt_no_ipcache = 0; /* use ipcache by default */ static int opt_send_signal = -1; /* no signal to send */ int vhost_mode = 0; -int unbuffered_logs = 1; /* debug and hierarhcy unbuffered by default */ -int shutdown_pending = 0; /* set by SIGTERM handler (shut_down()) */ -int reread_pending = 0; /* set by SIGHUP handler */ +volatile int unbuffered_logs = 1; /* debug and hierarchy unbuffered by default */ +volatile int shutdown_pending = 0; /* set by SIGTERM handler (shut_down()) */ +volatile int reread_pending = 0; /* set by SIGHUP handler */ char version_string[] = SQUID_VERSION; char appname[] = "squid"; char localhost[] = "127.0.0.1"; @@ -132,7 +132,7 @@ char *dash_str = "-"; /* for error reporting from xmalloc and friends */ extern void (*failure_notify) __P((char *)); -static int rotate_pending = 0; /* set by SIGUSR1 handler */ +volatile static int rotate_pending = 0; /* set by SIGUSR1 handler */ static int httpPortNumOverride = 1; static int icpPortNumOverride = 1; /* Want to detect "-u 0" */ #if MALLOC_DBG @@ -540,29 +540,29 @@ static time_t mainMaintenance(void) { time_t next; - int n; if (squid_curtime >= next_maintain) { storeMaintainSwapSpace(); next_maintain = squid_curtime + 1; } - if (store_rebuilding != STORE_NOT_REBUILDING) - goto maintenance_done; - if (squid_curtime >= next_ip_purge) { - ipcache_purgelru(); - next_ip_purge = squid_curtime + 10; - } else if (squid_curtime >= next_dirclean) { - /* clean a cache directory every 15 seconds */ - /* 15 * 16 * 256 = 17 hrs */ - storeDirClean(); - next_dirclean = squid_curtime + 15; - } else if (squid_curtime >= next_cleaning) { - n = storePurgeOld(); - next_cleaning = squid_curtime + Config.cleanRate; - } else if (squid_curtime >= next_announce) { - send_announce(); - next_announce = squid_curtime + Config.Announce.rate; + + if (store_rebuilding == STORE_NOT_REBUILDING) { + if (squid_curtime >= next_ip_purge) { + ipcache_purgelru(); + next_ip_purge = squid_curtime + 10; + } else if (squid_curtime >= next_dirclean) { + /* clean a cache directory every 15 seconds */ + /* 15 * 16 * 256 = 17 hrs */ + storeDirClean(); + next_dirclean = squid_curtime + 15; + } else if (squid_curtime >= next_cleaning) { + storePurgeOld(); + next_cleaning = squid_curtime + Config.cleanRate; + } else if (squid_curtime >= next_announce) { + send_announce(); + next_announce = squid_curtime + Config.Announce.rate; + } } - maintenance_done: + next = next_ip_purge; if (next_dirclean < next) next = next_dirclean; diff --git a/src/squid.h b/src/squid.h index 9ac08387e5..0b959710c2 100644 --- a/src/squid.h +++ b/src/squid.h @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.49 1996/09/16 21:11:14 wessels Exp $ + * $Id: squid.h,v 1.50 1996/09/17 16:32:45 wessels Exp $ * * AUTHOR: Duane Wessels * @@ -152,7 +152,7 @@ #endif #ifndef INADDR_NONE -#define INADDR_NONE -1 +#define INADDR_NONE ((unsigned long) -1) #endif #if !defined(HAVE_RUSAGE) && defined(_SQUID_HPUX_) @@ -264,8 +264,8 @@ extern int do_reuse; /* main.c */ extern int theHttpConnection; /* main.c */ extern int theInIcpConnection; /* main.c */ extern int theOutIcpConnection; /* main.c */ -extern int shutdown_pending; /* main.c */ -extern int reread_pending; /* main.c */ +extern volatile int shutdown_pending; /* main.c */ +extern volatile int reread_pending; /* main.c */ extern int opt_unlink_on_reload; /* main.c */ extern int opt_reload_hit_only; /* main.c */ extern int opt_dns_tests; /* main.c */ diff --git a/src/stat.cc b/src/stat.cc index e15cdd3d4b..07a81c29fd 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,5 +1,5 @@ /* - * $Id: stat.cc,v 1.71 1996/09/17 02:30:03 wessels Exp $ + * $Id: stat.cc,v 1.72 1996/09/17 16:32:46 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -120,8 +120,8 @@ typedef struct _squid_read_data_t { /* GLOBALS */ Meta_data meta_data; -unsigned long ntcpconn = 0; -unsigned long nudpconn = 0; +volatile unsigned long ntcpconn = 0; +volatile unsigned long nudpconn = 0; struct _iostats IOStats; char *stat_describe(); diff --git a/src/tools.cc b/src/tools.cc index 47ab643fba..7cf44c9081 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,6 +1,6 @@ /* - * $Id: tools.cc,v 1.60 1996/09/17 02:30:06 wessels Exp $ + * $Id: tools.cc,v 1.61 1996/09/17 16:32:49 wessels Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -613,7 +613,7 @@ accessLogTime(time_t t) { struct tm *tm; static char buf[128]; - static char last_t = 0; + static time_t last_t = 0; if (t != last_t) { tm = localtime(&t); strftime(buf, 127, "%y/%m/%d %T", tm);