]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix bug in hash_binary_file
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 18 Jun 2020 18:18:37 +0000 (20:18 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 18 Jun 2020 19:12:46 +0000 (21:12 +0200)
Introduced in #577 (213d9883).

src/hashutil.cpp

index 97f12f9395216955c2ff82f42a32f0cb38ed80e0..777c1e8efecdf498d669da332fb074d01598f8ec 100644 (file)
@@ -361,7 +361,7 @@ hash_binary_file(const Context& ctx, struct hash* hash, const char* path)
   Digest digest;
   if (!ctx.inode_cache.get(path, InodeCache::ContentType::binary, digest)) {
     struct hash* file_hash = hash_init();
-    if (!hash_file(hash, path)) {
+    if (!hash_file(file_hash, path)) {
       return false;
     }
     digest = hash_result(file_hash);