]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix indentation
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 2 Nov 2009 17:52:30 +0000 (18:52 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 5 Jan 2010 17:53:01 +0000 (18:53 +0100)
ccache.c
mdfour.c
util.c

index 02cca11de03e8ff4d1889fea1bf319fc3370580f..99b3ff7be0b09c8f6ed2130745421644e3e9aa25 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -215,7 +215,7 @@ static void to_cache(ARGS *args)
                                }
 
                                /* we can use a quick method of
-                                   getting the failed output */
+                                  getting the failed output */
                                copy_fd(fd, 2);
                                close(fd);
                                unlink(tmp_stderr);
@@ -250,7 +250,7 @@ static void to_cache(ARGS *args)
                cc_log("failed to stat cache files - %s\n", strerror(errno));
                stats_update(STATS_ERROR);
                failed();
-    }
+       }
 #endif
 
        cc_log("Placed %s into cache\n", output_file);
@@ -508,7 +508,7 @@ static void from_cache(int first)
        /* update timestamps for LRU cleanup
           also gives output_file a sensible mtime when hard-linking (for make) */
 #ifdef HAVE_UTIMES
-       utimes(hashname, NULL);
+       utimes(hashname, NULL);
        utimes(stderr_file, NULL);
 #else
        utime(hashname, NULL);
@@ -1002,8 +1002,7 @@ static int ccache_main(int argc, char *argv[])
        int c;
        size_t v;
 
-       static struct option long_options[] =
-        {
+       static struct option long_options[] = {
                {"show-stats", no_argument,       0, 's'},
                {"zero-stats", no_argument,       0, 'z'},
                {"cleanup",    no_argument,       0, 'c'},
@@ -1013,7 +1012,7 @@ static int ccache_main(int argc, char *argv[])
                {"help",       no_argument,       0, 'h'},
                {"version",    no_argument,       0, 'V'},
                {0, 0, 0, 0}
-        };
+       };
        int option_index = 0;
 
        while ((c = getopt_long(argc, argv, "hszcCF:M:V", long_options, &option_index)) != -1) {
index b098e0215ee5203cda3aaf936937c4a17acb85cf..ca7af79e2f2bfe9f4de0812e2dc8dfe31c71bb07 100644 (file)
--- a/mdfour.c
+++ b/mdfour.c
@@ -46,32 +46,32 @@ static void mdfour64(uint32 *M)
        A = m->A; B = m->B; C = m->C; D = m->D; 
        AA = A; BB = B; CC = C; DD = D;
 
-        ROUND1(A,B,C,D,  0,  3);  ROUND1(D,A,B,C,  1,  7);  
+       ROUND1(A,B,C,D,  0,  3);  ROUND1(D,A,B,C,  1,  7);  
        ROUND1(C,D,A,B,  2, 11);  ROUND1(B,C,D,A,  3, 19);
-        ROUND1(A,B,C,D,  4,  3);  ROUND1(D,A,B,C,  5,  7);  
+       ROUND1(A,B,C,D,  4,  3);  ROUND1(D,A,B,C,  5,  7);  
        ROUND1(C,D,A,B,  6, 11);  ROUND1(B,C,D,A,  7, 19);
-        ROUND1(A,B,C,D,  8,  3);  ROUND1(D,A,B,C,  9,  7);  
+       ROUND1(A,B,C,D,  8,  3);  ROUND1(D,A,B,C,  9,  7);  
        ROUND1(C,D,A,B, 10, 11);  ROUND1(B,C,D,A, 11, 19);
-        ROUND1(A,B,C,D, 12,  3);  ROUND1(D,A,B,C, 13,  7);  
+       ROUND1(A,B,C,D, 12,  3);  ROUND1(D,A,B,C, 13,  7);  
        ROUND1(C,D,A,B, 14, 11);  ROUND1(B,C,D,A, 15, 19);      
 
 
-        ROUND2(A,B,C,D,  0,  3);  ROUND2(D,A,B,C,  4,  5);  
+       ROUND2(A,B,C,D,  0,  3);  ROUND2(D,A,B,C,  4,  5);  
        ROUND2(C,D,A,B,  8,  9);  ROUND2(B,C,D,A, 12, 13);
-        ROUND2(A,B,C,D,  1,  3);  ROUND2(D,A,B,C,  5,  5);  
+       ROUND2(A,B,C,D,  1,  3);  ROUND2(D,A,B,C,  5,  5);  
        ROUND2(C,D,A,B,  9,  9);  ROUND2(B,C,D,A, 13, 13);
-        ROUND2(A,B,C,D,  2,  3);  ROUND2(D,A,B,C,  6,  5);  
+       ROUND2(A,B,C,D,  2,  3);  ROUND2(D,A,B,C,  6,  5);  
        ROUND2(C,D,A,B, 10,  9);  ROUND2(B,C,D,A, 14, 13);
-        ROUND2(A,B,C,D,  3,  3);  ROUND2(D,A,B,C,  7,  5);  
+       ROUND2(A,B,C,D,  3,  3);  ROUND2(D,A,B,C,  7,  5);  
        ROUND2(C,D,A,B, 11,  9);  ROUND2(B,C,D,A, 15, 13);
 
        ROUND3(A,B,C,D,  0,  3);  ROUND3(D,A,B,C,  8,  9);  
        ROUND3(C,D,A,B,  4, 11);  ROUND3(B,C,D,A, 12, 15);
-        ROUND3(A,B,C,D,  2,  3);  ROUND3(D,A,B,C, 10,  9);  
+       ROUND3(A,B,C,D,  2,  3);  ROUND3(D,A,B,C, 10,  9);  
        ROUND3(C,D,A,B,  6, 11);  ROUND3(B,C,D,A, 14, 15);
-        ROUND3(A,B,C,D,  1,  3);  ROUND3(D,A,B,C,  9,  9);  
+       ROUND3(A,B,C,D,  1,  3);  ROUND3(D,A,B,C,  9,  9);  
        ROUND3(C,D,A,B,  5, 11);  ROUND3(B,C,D,A, 13, 15);
-        ROUND3(A,B,C,D,  3,  3);  ROUND3(D,A,B,C, 11,  9);  
+       ROUND3(A,B,C,D,  3,  3);  ROUND3(D,A,B,C, 11,  9);  
        ROUND3(C,D,A,B,  7, 11);  ROUND3(B,C,D,A, 15, 15);
 
        A += AA; B += BB; 
@@ -273,7 +273,7 @@ static void file_checksum2(char *fname)
 }
 #endif
 
- int main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
        file_checksum1(argv[1]);
 #if 0
diff --git a/util.c b/util.c
index fc5a4c7a2faaa8e8e98c3aa860aae219919e4fe1..5f8af593989dab5e2c7823a84d96e49cc909eb92 100644 (file)
--- a/util.c
+++ b/util.c
@@ -60,19 +60,17 @@ void copy_fd(int fd_in, int fd_out)
 
 static int safe_rename(const char* oldpath, const char* newpath)
 {
-    /* safe_rename is for creating entries in the cache.
-
-       Works like rename(), but it never overwrites an existing
-       cache entry. This avoids corruption on NFS. */
-    int status = link( oldpath, newpath );
-    if( status == 0 || errno == EEXIST )
-    {
-       return unlink( oldpath );
-    }
-    else
-    {
-       return -1;
-    }
+       /* safe_rename is for creating entries in the cache.
+
+          Works like rename(), but it never overwrites an existing
+          cache entry. This avoids corruption on NFS. */
+       int status = link(oldpath, newpath);
+       if (status == 0 || errno == EEXIST) {
+               return unlink(oldpath);
+       }
+       else {
+               return -1;
+       }
 }
  
 /* move a file using rename */