From: Joel Rosdahl Date: Tue, 3 Jul 2012 09:44:55 +0000 (+0200) Subject: Avoid overflowing calculation of large max size counter X-Git-Tag: v3.2~132 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1285bfd33a716c04231e4a5c8b4e6bb61586f8b1;p=thirdparty%2Fccache.git Avoid overflowing calculation of large max size counter --- diff --git a/stats.c b/stats.c index a43d39c7b..d3054d95b 100644 --- a/stats.c +++ b/stats.c @@ -250,7 +250,7 @@ stats_flush(void) need_cleanup = true; } if (conf->max_size != 0 - && counters->data[STATS_TOTALSIZE] * 1024 > conf->max_size / 16) { + && counters->data[STATS_TOTALSIZE] > conf->max_size / 1024 / 16) { need_cleanup = true; }