]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Avoid overflowing calculation of large max size counter
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 3 Jul 2012 09:44:55 +0000 (11:44 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 3 Jul 2012 19:30:45 +0000 (21:30 +0200)
stats.c

diff --git a/stats.c b/stats.c
index a43d39c7baf847d956b29b1d476624bc43a22270..d3054d95bc7ab3e73f53cb2fcfad513ff68d9785 100644 (file)
--- 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;
        }