diff --git a/encode2-test.c b/encode2-test.c index 4699640..c807f47 100644 --- a/encode2-test.c +++ b/encode2-test.c @@ -15,7 +15,7 @@ void print_hex(const uint8_t* buf, size_t len) { static int check(const uint8_t* buf, const void* exp, size_t exp_len, unsigned res, const char* name) { - if (__builtin_expect(res == exp_len && !memcmp(buf, exp, exp_len), 1)) + if (res == exp_len && !memcmp(buf, exp, exp_len)) return 0; printf("Failed case (new) %s:\n", name); printf(" Exp (%2zu): ", exp_len); diff --git a/encode2-test.cc b/encode2-test.cc index 77b296d..b6a8331 100644 --- a/encode2-test.cc +++ b/encode2-test.cc @@ -17,7 +17,7 @@ void print_hex(const uint8_t* buf, size_t len) { static int check(const Buffer& buf, const char* exp, size_t exp_len, unsigned res, const char* name) { - if (__builtin_expect(res == exp_len && !std::memcmp(buf.data(), exp, exp_len), 1)) + if (res == exp_len && !std::memcmp(buf.data(), exp, exp_len)) return 0; std::printf("Failed case (new) %s:\n", name); std::printf(" Exp (%2zu): ", exp_len);