From efd6f95b0d23ac359feaefb9270e6f3d69f787b3 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Thu, 11 Apr 2019 22:11:43 +0200 Subject: [PATCH] Remove now unnecessary hash copy --- src/ccache.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ccache.c b/src/ccache.c index 7c0427f4e..f845c4f67 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -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); -- 2.47.2