]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Remove now unnecessary hash copy
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 11 Apr 2019 20:11:43 +0000 (22:11 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 11 Apr 2019 20:16:21 +0000 (22:16 +0200)
src/ccache.c

index 7c0427f4e07082f8818c7427a7bcd890c5e94d74..f845c4f67840f8a958760f24fd006776dd4edd8e 100644 (file)
@@ -2152,11 +2152,7 @@ calculate_object_hash(struct args *args, struct hash *hash, int direct_mode)
                        return NULL;
                }
 
-               // We can't finalize hash here since its current state may be used by the
-               // depend mode code later, so make a copy.
-               struct hash *hash2 = hash_copy(hash);
-               char *manifest_name = hash_result(hash2);
-               hash_free(hash2);
+               char *manifest_name = hash_result(hash);
                manifest_path = get_path_in_cache(manifest_name, ".manifest");
                free(manifest_name);