From f0fe68b87e8d2aea82b2cf51e3497b306f8b51e1 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 5 Oct 2020 14:03:23 +0200 Subject: [PATCH] Fix bad sizeof() application Found by Cppcheck. --- unittest/test_Hash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.47.3