From: Joel Rosdahl Date: Mon, 5 Oct 2020 12:03:23 +0000 (+0200) Subject: Fix bad sizeof() application X-Git-Tag: v4.0~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0fe68b87e8d2aea82b2cf51e3497b306f8b51e1;p=thirdparty%2Fccache.git Fix bad sizeof() application Found by Cppcheck. --- diff --git a/unittest/test_Hash.cpp b/unittest/test_Hash.cpp index 74351c6e7..8107c89ad 100644 --- a/unittest/test_Hash.cpp +++ b/unittest/test_Hash.cpp @@ -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();