aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/selftest/counter.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-10-08 03:54:28 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-08 18:51:34 +0200
commit780a5974d0256eed1e03a096b43f066043f8eb15 (patch)
tree3ba7923f145fd27706c11f956b1e485fd7dca5d6 /src/selftest/counter.c
parentglobal: rename struct wireguard_ to struct wg_ (diff)
downloadwireguard-monolithic-historical-780a5974d0256eed1e03a096b43f066043f8eb15.tar.xz
wireguard-monolithic-historical-780a5974d0256eed1e03a096b43f066043f8eb15.zip
global: more nits
Diffstat (limited to 'src/selftest/counter.c')
-rw-r--r--src/selftest/counter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/selftest/counter.c b/src/selftest/counter.c
index 7e14eeb..0d8b192 100644
--- a/src/selftest/counter.c
+++ b/src/selftest/counter.c
@@ -17,7 +17,7 @@ bool __init wg_packet_counter_selftest(void)
#define T_LIM (COUNTER_WINDOW_SIZE + 1)
#define T(n, v) do { \
++test_num; \
- if (counter_validate(&counter, n) != v) { \
+ if (counter_validate(&counter, n) != (v)) { \
pr_err("nonce counter self-test %u: FAIL\n", \
test_num); \
success = false; \
@@ -92,6 +92,7 @@ bool __init wg_packet_counter_selftest(void)
T(i, true);
T(0, true);
T(COUNTER_WINDOW_SIZE + 1, true);
+
#undef T
#undef T_LIM
#undef T_INIT