/*
* Copyright (C) 2002-2004 Andrew Tridgell
- * Copyright (C) 2009-2011 Joel Rosdahl
+ * Copyright (C) 2009-2014 Joel Rosdahl
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
int i;
extern char *cache_logfile;
- if (getenv("CCACHE_NOSTATS")) return;
+ if (getenv("CCACHE_NOSTATS")) {
+ return;
+ }
- init_counter_updates();
+ if (!counter_updates) {
+ return;
+ }
for (i = 0; i < STATS_END; ++i) {
if (counter_updates->data[i] > 0) {
break;
}
}
- if (!should_flush) return;
+ if (!should_flush) {
+ return;
+ }
if (!stats_file) {
char *stats_dir;