]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
format fixes
authorhno <>
Wed, 24 Oct 2001 12:16:16 +0000 (12:16 +0000)
committerhno <>
Wed, 24 Oct 2001 12:16:16 +0000 (12:16 +0000)
13 files changed:
src/comm_select.cc
src/dns_internal.cc
src/fqdncache.cc
src/ftp.cc
src/helper.cc
src/ipcache.cc
src/main.cc
src/peer_digest.cc
src/snmp_agent.cc
src/stat.cc
src/store.cc
src/store_client.cc
src/store_digest.cc

index 6bd1f9c8f98897795fc955e7a49ed35b059ad669..c7861f2f5d7dc8935338850605daf98b03d7b56e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm_select.cc,v 1.51 2001/10/19 22:34:49 hno Exp $
+ * $Id: comm_select.cc,v 1.52 2001/10/24 06:16:16 hno Exp $
  *
  * DEBUG: section 5     Socket Functions
  *
@@ -397,7 +397,7 @@ comm_poll(int msec)
            return COMM_ERROR;
            /* NOTREACHED */
        }
-       debug(5, num ? 5 : 8) ("comm_poll: %d+%d FDs ready\n", num, npending);
+       debug(5, num ? 5 : 8) ("comm_poll: %d+%ld FDs ready\n", num, npending);
        statHistCount(&statCounter.select_fds_hist, num);
        /* Check timeout handlers ONCE each second. */
        if (squid_curtime > last_timeout) {
@@ -521,7 +521,7 @@ comm_poll(int msec)
        return COMM_OK;
     }
     while (timeout > current_dtime);
-    debug(5, 8) ("comm_poll: time out: %d.\n", squid_curtime);
+    debug(5, 8) ("comm_poll: time out: %ld.\n", (long int)squid_curtime);
     return COMM_TIMEOUT;
 }
 
index 6529e52ecd5a4f6f2dff043ee66d9f0dab480b1a..2e7427656036e07527c9f8d04d91383b9a30563e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dns_internal.cc,v 1.42 2001/10/12 23:33:00 hno Exp $
+ * $Id: dns_internal.cc,v 1.43 2001/10/24 06:16:16 hno Exp $
  *
  * DEBUG: section 78    DNS lookups; interacts with lib/rfc1035.c
  * AUTHOR: Duane Wessels
@@ -718,7 +718,7 @@ snmp_netIdnsFn(variable_list * Var, snint * ErrP)
 {
     int i, n = 0;
     variable_list *Answer = NULL;
-    debug(49, 5) ("snmp_netDnsFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]);
+    debug(49, 5) ("snmp_netDnsFn: Processing request: \n");
     snmpDebugOid(5, Var->name, Var->name_length);
     *ErrP = SNMP_ERR_NOERROR;
     switch (Var->name[LEN_SQ_NET + 1]) {
index deef6e0f630a552d135e86ef6769dc5b1916ffd1..e8d30a0f5e96ae26536a2054f70dd59a5fca5538 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: fqdncache.cc,v 1.148 2001/03/03 10:39:31 hno Exp $
+ * $Id: fqdncache.cc,v 1.149 2001/10/24 06:16:16 hno Exp $
  *
  * DEBUG: section 35    FQDN Cache
  * AUTHOR: Harvest Derived
@@ -602,7 +602,7 @@ variable_list *
 snmp_netFqdnFn(variable_list * Var, snint * ErrP)
 {
     variable_list *Answer = NULL;
-    debug(49, 5) ("snmp_netFqdnFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]);
+    debug(49, 5) ("snmp_netFqdnFn: Processing request:\n");
     snmpDebugOid(5, Var->name, Var->name_length);
     *ErrP = SNMP_ERR_NOERROR;
     switch (Var->name[LEN_SQ_NET + 1]) {
index 261d3fa9aa77c9e10cd6091d0c4e01b0687dc725..c4b32bc271c3e7f6fbb43ecbe35bd8dc9b9e7d29 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.313 2001/10/17 20:25:02 hno Exp $
+ * $Id: ftp.cc,v 1.314 2001/10/24 06:16:16 hno Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -1987,7 +1987,7 @@ ftpReadStor(FtpStateData * ftpState)
            ftpState,
            0);
     } else {
-       debug(9, 3) ("ftpReadStor: Unexpected reply code %s\n", code);
+       debug(9, 3) ("ftpReadStor: Unexpected reply code %03d\n", code);
        ftpFail(ftpState);
     }
 }
index 251b121e375321e594bf53d1a7591417c642de5b..67c3e90047d142cfcf41b6d60bbeb011a001536d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: helper.cc,v 1.31 2001/10/17 20:25:02 hno Exp $
+ * $Id: helper.cc,v 1.32 2001/10/24 06:16:16 hno Exp $
  *
  * DEBUG: section 29    Helper process maintenance
  * AUTHOR: Harvest Derived?
@@ -264,7 +264,7 @@ helperStatefulSubmit(statefulhelper * hlp, const char *buf, HLPSCB * callback, v
     }
     cbdataLock(r->data);
     if ((buf != NULL) && lastserver) {
-       debug(29, 5) ("StatefulSubmit with lastserver %d\n", lastserver);
+       debug(29, 5) ("StatefulSubmit with lastserver %p\n", lastserver);
        /* the queue doesn't count for this assert because queued requests
         * have already gone through here and been tested.
         * It's legal to have deferred_requests == 0 and queue entries 
@@ -464,7 +464,7 @@ helperStatefulStats(StoreEntry * sentry, statefulhelper * hlp)
     storeAppendPrintf(sentry, "avg service time: %d msec\n",
        hlp->stats.avg_svc_time);
     storeAppendPrintf(sentry, "\n");
-    storeAppendPrintf(sentry, "%7s\t%7s\t%7s\t%11s\t%s\t%7s\t%7s\t%7s\n",
+    storeAppendPrintf(sentry, "%7s\t%7s\t%7s\t%11s\t%s\t%7s\t%7s\t%7s\t%7s\n",
        "#",
        "FD",
        "PID",
index b7dca00b5442f794c20d75c1f87bf80912b17e54..b70c1127dcbb9dc32aa191f067022ae2dca027af 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipcache.cc,v 1.234 2001/03/03 10:39:32 hno Exp $
+ * $Id: ipcache.cc,v 1.235 2001/10/24 06:16:16 hno Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -766,7 +766,7 @@ variable_list *
 snmp_netIpFn(variable_list * Var, snint * ErrP)
 {
     variable_list *Answer = NULL;
-    debug(49, 5) ("snmp_netIpFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]);
+    debug(49, 5) ("snmp_netIpFn: Processing request:\n");
     snmpDebugOid(5, Var->name, Var->name_length);
     *ErrP = SNMP_ERR_NOERROR;
     switch (Var->name[LEN_SQ_NET + 1]) {
index 945b21475b8219f58402f52365febe5effd74123..36004580d51687618cc70a932658faafd73c0ece 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.343 2001/10/23 12:14:49 hno Exp $
+ * $Id: main.cc,v 1.344 2001/10/24 06:16:16 hno Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -705,7 +705,7 @@ main(int argc, char **argv)
            debug(1, 1) ("Preparing for shutdown after %d requests\n",
                statCounter.client_http.requests);
            debug(1, 1) ("Waiting %d seconds for active connections to finish\n",
-               wait);
+               (int)wait);
            do_shutdown = 0;
            shutting_down = 1;
            serverConnectionsClose();
index dcac5e312a8c536252c894ac5ed7c3dbfd8a8ac0..464b184cac5e3221d63d1f9d80f52437a4e08699 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_digest.cc,v 1.81 2001/04/14 00:25:18 hno Exp $
+ * $Id: peer_digest.cc,v 1.82 2001/10/24 06:16:17 hno Exp $
  *
  * DEBUG: section 72    Peer Digest Routines
  * AUTHOR: Alex Rousskov
@@ -193,7 +193,7 @@ peerDigestSetCheck(PeerDigest * pd, time_t delay)
     eventAdd("peerDigestCheck", peerDigestCheck, pd, (double) delay, 1);
     pd->times.next_check = squid_curtime + delay;
     debug(72, 3) ("peerDigestSetCheck: will check peer %s in %d secs\n",
-       strBuf(pd->host), delay);
+       strBuf(pd->host), (int)delay);
 }
 
 /*
@@ -235,8 +235,8 @@ peerDigestCheck(void *data)
        return;
     }
     debug(72, 3) ("peerDigestCheck: peer %s:%d\n", pd->peer->host, pd->peer->http_port);
-    debug(72, 3) ("peerDigestCheck: time: %d, last received: %d (%+d)\n",
-       squid_curtime, pd->times.received, (squid_curtime - pd->times.received));
+    debug(72, 3) ("peerDigestCheck: time: %ld, last received: %ld (%+d)\n",
+       (long int)squid_curtime, (long int)pd->times.received, (int)(squid_curtime - pd->times.received));
 
     /* decide when we should send the request:
      * request now unless too close to other requests */
@@ -245,15 +245,15 @@ peerDigestCheck(void *data)
     /* per-peer limit */
     if (req_time - pd->times.received < PeerDigestReqMinGap) {
        debug(72, 2) ("peerDigestCheck: %s, avoiding close peer requests (%d < %d secs).\n",
-           strBuf(pd->host), req_time - pd->times.received,
-           PeerDigestReqMinGap);
+           strBuf(pd->host), (int)(req_time - pd->times.received),
+           (int)PeerDigestReqMinGap);
        req_time = pd->times.received + PeerDigestReqMinGap;
     }
     /* global limit */
     if (req_time - pd_last_req_time < GlobDigestReqMinGap) {
        debug(72, 2) ("peerDigestCheck: %s, avoiding close requests (%d < %d secs).\n",
-           strBuf(pd->host), req_time - pd_last_req_time,
-           GlobDigestReqMinGap);
+           strBuf(pd->host), (int)(req_time - pd_last_req_time),
+           (int)GlobDigestReqMinGap);
        req_time = pd_last_req_time + GlobDigestReqMinGap;
     }
     if (req_time <= squid_curtime)
@@ -353,9 +353,9 @@ peerDigestFetchReply(void *data, char *buf, ssize_t size)
        assert(reply);
        httpReplyParse(reply, buf, hdr_size);
        status = reply->sline.status;
-       debug(72, 3) ("peerDigestFetchReply: %s status: %d, expires: %d (%+d)\n",
+       debug(72, 3) ("peerDigestFetchReply: %s status: %d, expires: %ld (%+d)\n",
            strBuf(pd->host), status,
-           reply->expires, reply->expires - squid_curtime);
+           (long int)reply->expires, (int)(reply->expires - squid_curtime));
 
        /* this "if" is based on clientHandleIMSReply() */
        if (status == HTTP_NOT_MODIFIED) {
@@ -730,10 +730,10 @@ peerDigestFetchSetStats(DigestFetchState * fetch)
     fetch->resp_time = squid_curtime - fetch->start_time;
 
     debug(72, 3) ("peerDigestFetchFinish: recv %d bytes in %d secs\n",
-       fetch->recv.bytes, fetch->resp_time);
-    debug(72, 3) ("peerDigestFetchFinish: expires: %d (%+d), lmt: %d (%+d)\n",
-       fetch->expires, fetch->expires - squid_curtime,
-       fetch->entry->lastmod, fetch->entry->lastmod - squid_curtime);
+       fetch->recv.bytes, (int)fetch->resp_time);
+    debug(72, 3) ("peerDigestFetchFinish: expires: %ld (%+d), lmt: %ld (%+d)\n",
+       (long int)fetch->expires, (int)(fetch->expires - squid_curtime),
+       (long int)fetch->entry->lastmod, (int)(fetch->entry->lastmod - squid_curtime));
 }
 
 
@@ -835,8 +835,8 @@ void
 peerDigestStatsReport(const PeerDigest * pd, StoreEntry * e)
 {
 #define f2s(flag) (pd->flags.flag ? "yes" : "no")
-#define appendTime(tm) storeAppendPrintf(e, "%s\t %10d\t %+d\t %+d\n", \
-    ""#tm, pd->times.tm, \
+#define appendTime(tm) storeAppendPrintf(e, "%s\t %10ld\t %+d\t %+d\n", \
+    ""#tm, (long int)pd->times.tm, \
     saneDiff(pd->times.tm - squid_curtime), \
     saneDiff(pd->times.tm - pd->times.initialized))
 
@@ -858,9 +858,9 @@ peerDigestStatsReport(const PeerDigest * pd, StoreEntry * e)
     storeAppendPrintf(e, "\tneeded: %3s, usable: %3s, requested: %3s\n",
        f2s(needed), f2s(usable), f2s(requested));
     storeAppendPrintf(e, "\n\tlast retry delay: %d secs\n",
-       pd->times.retry_delay);
+       (int)pd->times.retry_delay);
     storeAppendPrintf(e, "\tlast request response time: %d secs\n",
-       pd->times.req_delay);
+       (int)pd->times.req_delay);
     storeAppendPrintf(e, "\tlast request result: %s\n",
        pd->req_result ? pd->req_result : "(none)");
 
index 4d637d1f60c394a23015c2fd233d2bb902e47f93..35c048278e68d344c543185517e7e4f5e1c6f7a9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: snmp_agent.cc,v 1.82 2001/10/17 20:25:03 hno Exp $
+ * $Id: snmp_agent.cc,v 1.83 2001/10/24 06:16:17 hno Exp $
  *
  * DEBUG: section 49     SNMP Interface
  * AUTHOR: Kostas Anagnostakis
@@ -47,7 +47,7 @@ variable_list *
 snmp_sysFn(variable_list * Var, snint * ErrP)
 {
     variable_list *Answer = NULL;
-    debug(49, 5) ("snmp_sysFn: Processing request:\n", Var->name[LEN_SQ_SYS]);
+    debug(49, 5) ("snmp_sysFn: Processing request:\n");
     snmpDebugOid(5, Var->name, Var->name_length);
     *ErrP = SNMP_ERR_NOERROR;
     switch (Var->name[LEN_SQ_SYS]) {
@@ -411,9 +411,9 @@ snmp_prfProtoFn(variable_list * Var, snint * ErrP)
            break;
        f = snmpStatGet(0);
        l = snmpStatGet(minutes);
-       debug(49, 8) ("median: min= %d, %d l= %x , f = %x\n", minutes,
+       debug(49, 8) ("median: min= %d, %d l= %p , f = %p\n", minutes,
            Var->name[LEN_SQ_PRF + 3], l, f);
-       debug(49, 8) ("median: l= %x , f = %x\n", l, f);
+       debug(49, 8) ("median: l= %p , f = %p\n", l, f);
        switch (Var->name[LEN_SQ_PRF + 3]) {
        case PERF_MEDIAN_TIME:
            x = minutes;
index edb099c2b550ea4b97d5ba0ccb9c3581fd166a68..53049f150bd2ad76a1b8a95ce48f33a0221a436e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.348 2001/08/16 00:16:18 hno Exp $
+ * $Id: stat.cc,v 1.349 2001/10/24 06:16:17 hno Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -1409,8 +1409,8 @@ statClientRequests(StoreEntry * s)
            storeAppendPrintf(s, "\tFD %d, read %d, wrote %d\n", fd,
                fd_table[fd].bytes_read, fd_table[fd].bytes_written);
            storeAppendPrintf(s, "\tFD desc: %s\n", fd_table[fd].desc);
-           storeAppendPrintf(s, "\tin: buf %p, offset %d, size %d\n",
-               conn->in.buf, conn->in.offset, conn->in.size);
+           storeAppendPrintf(s, "\tin: buf %p, offset %ld, size %ld\n",
+               conn->in.buf, (long int)conn->in.offset, (long int)conn->in.size);
            storeAppendPrintf(s, "\tpeer: %s:%d\n",
                inet_ntoa(conn->peer.sin_addr),
                ntohs(conn->peer.sin_port));
@@ -1419,20 +1419,21 @@ statClientRequests(StoreEntry * s)
                ntohs(conn->me.sin_port));
            storeAppendPrintf(s, "\tnrequests: %d\n",
                conn->nrequests);
-           storeAppendPrintf(s, "\tdefer: n %d, until %d\n",
-               conn->defer.n, conn->defer.until);
+           storeAppendPrintf(s, "\tdefer: n %d, until %ld\n",
+               conn->defer.n, (long int)conn->defer.until);
        }
        storeAppendPrintf(s, "uri %s\n", http->uri);
        storeAppendPrintf(s, "log_type %s\n", log_tags[http->log_type]);
-       storeAppendPrintf(s, "out.offset %d, out.size %d\n",
-           http->out.offset, http->out.size);
+       storeAppendPrintf(s, "out.offset %ld, out.size %lu\n",
+           (long int)http->out.offset, (unsigned long int)http->out.size);
        storeAppendPrintf(s, "req_sz %d\n", http->req_sz);
        e = http->entry;
        storeAppendPrintf(s, "entry %p/%s\n", e, e ? storeKeyText(e->hash.key) : "N/A");
        e = http->old_entry;
        storeAppendPrintf(s, "old_entry %p/%s\n", e, e ? storeKeyText(e->hash.key) : "N/A");
-       storeAppendPrintf(s, "start %d.%06d (%f seconds ago)\n", http->start.tv_sec,
-           http->start.tv_usec,
+       storeAppendPrintf(s, "start %ld.%06d (%f seconds ago)\n",
+           (long int)http->start.tv_sec,
+           (int)http->start.tv_usec,
            tvSubDsec(http->start, current_time));
        storeAppendPrintf(s, "\n");
     }
index 253c768daf0db94a4e82b1bc2078f8d01ed2c7f7..6c135169e3649c9c3e471a746ef5064ae93f0322 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.542 2001/10/17 20:25:03 hno Exp $
+ * $Id: store.cc,v 1.543 2001/10/24 06:16:17 hno Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -1142,8 +1142,6 @@ storeMemObjectDump(MemObject * mem)
        (int) mem->inmem_hi);
     debug(20, 1) ("MemObject->inmem_lo: %d\n",
        (int) mem->inmem_lo);
-    debug(20, 1) ("MemObject->clients: %p\n",
-       mem->clients);
     debug(20, 1) ("MemObject->nclients: %d\n",
        mem->nclients);
     debug(20, 1) ("MemObject->reply: %p\n",
index 8f0fcb4756261b965a18e683b946dfae64318489..f3c91878e993ede9cdeacd3328eea1f274ea2e07 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_client.cc,v 1.102 2001/04/14 00:25:19 hno Exp $
+ * $Id: store_client.cc,v 1.103 2001/10/24 06:16:18 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Client-Side Interface
  * AUTHOR: Duane Wessels
@@ -426,7 +426,7 @@ storeClientReadHeader(void *data, const char *buf, ssize_t len)
                (void) 0;       /* a match! */
            else {
                debug(20, 1) ("storeClientReadHeader: URL mismatch\n");
-               debug(20, 1) ("\t{%s} != {%s}\n", t->value, mem->url);
+               debug(20, 1) ("\t{%s} != {%s}\n", (char *)t->value, mem->url);
                swap_object_ok = 0;
                break;
            }
index 393bdf4b835053ab10c15ac5963193e2ae6a475b..2ed444975240108c78049fb482dca0f7b6d1b68b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_digest.cc,v 1.49 2001/03/03 10:39:34 hno Exp $
+ * $Id: store_digest.cc,v 1.50 2001/10/24 06:16:18 hno Exp $
  *
  * DEBUG: section 71    Store Digest Manager
  * AUTHOR: Alex Rousskov
@@ -104,7 +104,7 @@ storeDigestInit(void)
     }
     store_digest = cacheDigestCreate(cap, Config.digest.bits_per_entry);
     debug(71, 1) ("Local cache digest enabled; rebuild/rewrite every %d/%d sec\n",
-       Config.digest.rebuild_period, Config.digest.rewrite_period);
+       (int)Config.digest.rebuild_period, (int)Config.digest.rewrite_period);
     memset(&sd_state, 0, sizeof(sd_state));
     cachemgrRegister("store_digest", "Store Digest",
        storeDigestReport, 0, 1);
@@ -219,7 +219,7 @@ storeDigestAddable(const StoreEntry * e)
     /* Note: We should use the time of the next rebuild, not (cur_time+period) */
     if (refreshCheckDigest(e, Config.digest.rebuild_period)) {
        debug(71, 6) ("storeDigestAdd: entry expires within %d secs, ignoring\n",
-           Config.digest.rebuild_period);
+           (int)Config.digest.rebuild_period);
        return 0;
     }
     /*
@@ -383,8 +383,8 @@ storeDigestRewriteResume(void)
     httpReplySetHeaders(e->mem_obj->reply, version, 200, "Cache Digest OK",
        "application/cache-digest", store_digest->mask_size + sizeof(sd_state.cblock),
        squid_curtime, squid_curtime + Config.digest.rewrite_period);
-    debug(71, 3) ("storeDigestRewrite: entry expires on %d (%+d)\n",
-       e->mem_obj->reply->expires, e->mem_obj->reply->expires - squid_curtime);
+    debug(71, 3) ("storeDigestRewrite: entry expires on %ld (%+d)\n",
+       (long int)e->mem_obj->reply->expires, (int)(e->mem_obj->reply->expires - squid_curtime));
     storeBuffer(e);
     httpReplySwapOut(e->mem_obj->reply, e);
     storeDigestCBlockSwapOut(e);
@@ -399,8 +399,8 @@ storeDigestRewriteFinish(StoreEntry * e)
     assert(sd_state.rewrite_lock && e == sd_state.rewrite_lock->data);
     storeComplete(e);
     storeTimestampsSet(e);
-    debug(71, 2) ("storeDigestRewriteFinish: digest expires at %d (%+d)\n",
-       e->expires, e->expires - squid_curtime);
+    debug(71, 2) ("storeDigestRewriteFinish: digest expires at %ld (%+d)\n",
+       (long int)e->expires, (int)(e->expires - squid_curtime));
     /* is this the write order? @?@ */
     requestUnlink(e->mem_obj->request);
     e->mem_obj->request = NULL;