From: Joel Rosdahl Date: Thu, 11 Apr 2019 20:11:43 +0000 (+0200) Subject: Remove now unnecessary hash copy X-Git-Tag: v3.7~25 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=efd6f95b0d23ac359feaefb9270e6f3d69f787b3;p=thirdparty%2Fccache.git Remove now unnecessary hash copy --- 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);