/* the base cache directory */
char *cache_dir = NULL;
-/* the directory for temporary files */
-static const char* temp_dir();
-
/* the debug logfile name, if set */
char *cache_logfile = NULL;
}
}
-static const char*
-temp_dir() {
+static const char *
+temp_dir()
+{
static char* path = NULL;
if (path) return path; /* Memoize */
path = getenv("CCACHE_TEMPDIR");
}
/* First see if whole path exists, so can avoid directory one-by-one check */
- if (!(stat(path, &st) == 0
- && S_ISDIR(st.st_mode))) {
+ if (!(stat(path, &st) == 0 && S_ISDIR(st.st_mode))) {
free(path);
path = x_strdup(cache_dir);
for (i = 0; i < nlevels; ++i) {