From: Joel Rosdahl Date: Tue, 5 Oct 2010 20:06:50 +0000 (+0200) Subject: Minor cleanup X-Git-Tag: v3.2~309 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=12715a28b2d163533f5e765e0d68d0d71880820a;p=thirdparty%2Fccache.git Minor cleanup --- diff --git a/ccache.c b/ccache.c index 1b9467c3f..43525c9b4 100644 --- a/ccache.c +++ b/ccache.c @@ -72,9 +72,6 @@ static char *current_working_dir; /* 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; @@ -250,8 +247,9 @@ clean_up_tmp_files() } } -static const char* -temp_dir() { +static const char * +temp_dir() +{ static char* path = NULL; if (path) return path; /* Memoize */ path = getenv("CCACHE_TEMPDIR"); @@ -294,8 +292,7 @@ get_path_in_cache(const char *name, const char *suffix) } /* 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) {