aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-09-11 00:10:53 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-11 00:10:53 -0400
commit2491eadf002e993bee11aa76597ec7f361d8f6e5 (patch)
treec6f71f76bc7c3408dfe59f2e458ccde6e9340bb0 /src/test/test_util.c
parent9e595a95a8aae83381246f012157107c9f6dde5e (diff)
downloadtor-2491eadf002e993bee11aa76597ec7f361d8f6e5.tar.gz
tor-2491eadf002e993bee11aa76597ec7f361d8f6e5.zip
C90 compliance for #13104 fixes
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index eed37ca817..e105435f05 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -3277,6 +3277,7 @@ test_util_di_ops(void)
/* exhaustively white-box test tor_memeq
* against each possible (single-byte) bit difference
* some arithmetic bugs only appear with certain bit patterns */
+ {
const uint8_t z = 0;
uint8_t ii = 0;
for (i = 0; i < 256; i++) {
@@ -3292,6 +3293,7 @@ test_util_di_ops(void)
test_eq(tor_memcmp(&z, &ii, 1) > 0 ? GT : EQ, z > ii ? GT : EQ);
test_eq(tor_memcmp(&ii, &z, 1) < 0 ? LT : EQ, ii < z ? LT : EQ);
}
+ }
tt_int_op(1, ==, safe_mem_is_zero("", 0));
tt_int_op(1, ==, safe_mem_is_zero("", 1));