summaryrefslogtreecommitdiff
path: root/lib/mac_test.c
diff options
context:
space:
mode:
authorPavel Tvrdik <pawel.tvrdik@gmail.com>2016-11-11 17:43:09 +0100
committerPavel Tvrdik <pawel.tvrdik@gmail.com>2016-11-11 17:43:09 +0100
commit5e3cd0e5b56e6c58cfba4d0d38fbbbed3657889d (patch)
tree3e96b946c06176731b1d2ba27605dc257ef9c7bc /lib/mac_test.c
parentfa71b268a8d15d579f50d7f4f92e2edb3b431e05 (diff)
Birdtest: Replace BT_SUCCESS and BT_FAILURE with 1 and 0
Diffstat (limited to 'lib/mac_test.c')
-rw-r--r--lib/mac_test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/mac_test.c b/lib/mac_test.c
index 8522f95e..806fe3e4 100644
--- a/lib/mac_test.c
+++ b/lib/mac_test.c
@@ -28,7 +28,7 @@ test_##name(void *out_, const void *in_, const void *expected_out_) \
uint len = mac_type_length(id); \
bt_bytes_to_hex(out, out_bin, len); \
\
- return strncmp(out, expected_out, 2*len+1) == 0 ? BT_SUCCESS : BT_FAILURE; \
+ return strncmp(out, expected_out, 2*len+1) == 0; \
}
define_test_hash_fn(md5, ALG_MD5)
@@ -283,8 +283,8 @@ test_##name##_hmac(void *out_, const void *in_, const void *expected_out_) \
\
uint len = mac_type_length(id); \
bt_bytes_to_hex(out, out_bin, len); \
- \
- return strncmp(out, expected_out, 2*len+1) == 0 ? BT_SUCCESS : BT_FAILURE; \
+ \
+ return strncmp(out, expected_out, 2*len+1) == 0; \
}
define_test_hmac_fn(md5, ALG_HMAC_MD5)
@@ -1092,7 +1092,7 @@ t_sha256_concating(void)
int are_hash_a_b_equal = (strncmp(hash_a, hash_b, sizeof(hash_a)) == 0);
bt_assert_msg(are_hash_a_b_equal, "Hashes A: %s, B: %s should be same", hash_a, hash_b);
- return BT_SUCCESS;
+ return 1;
}
@@ -1130,7 +1130,7 @@ t_sha512_concating(void)
int are_hash_a_b_equal = (strncmp(hash_a, hash_b, sizeof(hash_a)) == 0);
bt_assert_msg(are_hash_a_b_equal, "Hashes A: %s, B: %s should be same", hash_a, hash_b);
- return BT_SUCCESS;
+ return 1;
}
int