]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Minor cleanup
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 5 Oct 2010 20:06:50 +0000 (22:06 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 5 Oct 2010 20:06:50 +0000 (22:06 +0200)
ccache.c

index 1b9467c3fddad436431d03c6e4f294b5a7d6d848..43525c9b403a071a65687953d7d780f511da2b9b 100644 (file)
--- 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) {