]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Rename hash_debug, add matching end function
authorAnders F Björklund <anders.f.bjorklund@gmail.com>
Sun, 12 Aug 2018 14:06:39 +0000 (16:06 +0200)
committerAnders F Björklund <anders.f.bjorklund@gmail.com>
Sun, 12 Aug 2018 14:06:39 +0000 (16:06 +0200)
Remove the parameter stating if hit or miss

src/ccache.c
src/ccache.h
src/hash.c

index 8292bf7ef7ec635d259a21cc78d11b7862fe8195..1c597ad147551e106432d5ae18529ee95d95f50f 100644 (file)
@@ -481,15 +481,15 @@ debug_start(const char *path)
 {
        char *hash_bin = format("%s%s", path, ".ccache-hashX");
        char *hash_txt = format("%s%s", path, ".ccache-input");
-       hash_debug(hash_bin, hash_txt);
+       hash_debug_init(hash_bin, hash_txt);
        free(hash_bin);
        free(hash_txt);
 }
 
 static void
-debug_end(bool hit)
+debug_end()
 {
-       (void) hit;
+       hash_debug_end();
        char *path = format("%s%s", output_obj, ".ccache-log");
        cc_copylog(path);
        free(path);
@@ -2071,7 +2071,7 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest)
        }
 
        if (conf->debug) {
-               debug_end(true);
+               debug_end();
        }
 
        // And exit with the right status code.
@@ -3468,7 +3468,7 @@ ccache(int argc, char *argv[])
        to_cache(compiler_args);
 
        if (conf->debug) {
-               debug_end(false);
+               debug_end();
        }
 
        x_exit(0);
index 2c320d83cd504b73ad3857adb3e3bc6327632765..a7730fea62fb70d6c2989dbaa43b103b3fda3f2d 100644 (file)
@@ -118,7 +118,8 @@ bool args_equal(struct args *args1, struct args *args2);
 // ----------------------------------------------------------------------------
 // hash.c
 
-void hash_debug(const char *bin, const char *txt);
+void hash_debug_init(const char *bin, const char *txt);
+void hash_debug_end(void);
 void hash_start(struct mdfour *md);
 void hash_buffer(struct mdfour *md, const void *s, size_t len);
 char *hash_result(struct mdfour *md);
index 5a5bd27eb7da877fd74dc82b2182feb2913b74b9..f49dfd7f8eb70365ce458e3bcf60bc122d59964a 100644 (file)
@@ -26,7 +26,7 @@ char *debug_hash_bin;
 // text input, for debugging
 char *debug_hash_txt;
 
-void hash_debug(const char *bin, const char *txt)
+void hash_debug_init(const char *bin, const char *txt)
 {
        static char *hash_types = "cdp"; // common, direct, cpp
        if (bin) {
@@ -43,6 +43,10 @@ void hash_debug(const char *bin, const char *txt)
        }
 }
 
+void hash_debug_end()
+{
+}
+
 static void
 hash_binary_buffer(struct mdfour *md, const void *s, size_t len)
 {