From: wessels <> Date: Wed, 12 Aug 1998 02:39:44 +0000 (+0000) Subject: more CountHourHist fixes X-Git-Tag: SQUID_3_0_PRE1~2917 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ffb245b58253963bf49c63828a849831719ca8c8;p=thirdparty%2Fsquid.git more CountHourHist fixes --- diff --git a/src/stat.cc b/src/stat.cc index 418452b67c..a8c57058e2 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.275 1998/08/11 20:07:05 wessels Exp $ + * $Id: stat.cc,v 1.276 1998/08/11 20:39:44 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -822,9 +822,10 @@ statAvgTick(void *notused) if ((NCountHist % COUNT_INTERVAL) == 0) { /* we have an hours worth of readings. store previous hour */ - StatCounters *p = &CountHourHist[0]; - StatCounters *t = &CountHourHist[1]; + StatCounters *t = &CountHourHist[0]; + StatCounters *p = &CountHourHist[1]; StatCounters *c = &CountHist[N_COUNT_HIST]; + statCountersClean(CountHourHist + N_COUNT_HOUR_HIST - 1); xmemmove(p, t, (N_COUNT_HOUR_HIST - 1) * sizeof(StatCounters)); statCountersCopy(t, c); NCountHourHist++;