]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix bad sizeof() application
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 5 Oct 2020 12:03:23 +0000 (14:03 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 5 Oct 2020 12:03:23 +0000 (14:03 +0200)
Found by Cppcheck.

unittest/test_Hash.cpp

index 74351c6e71a2ba7fbe5c461e934c9d3ed6cfb239..8107c89adfbc2c9be5454cda116ef60647acefb7 100644 (file)
@@ -80,7 +80,7 @@ TEST_CASE("Digest::bytes")
     0x7b, 0xc2, 0xa2, 0xee, 0xb9, 0x5d, 0xdb, 0xf9, 0xb7, 0xec,
     0xf6, 0xad, 0xcb, 0x76, 0xb4, 0x53, 0x09, 0x1c, 0x58, 0xdc,
   };
-  CHECK(memcmp(d.bytes(), expected, sizeof(Digest::size())) == 0);
+  CHECK(memcmp(d.bytes(), expected, Digest::size()) == 0);
 }
 
 TEST_SUITE_END();