git: ff92a03616c5 - main - if_wg: fix build with DIAGNOSTICS
Kyle Evans
kevans at FreeBSD.org
Mon Mar 15 12:36:15 UTC 2021
The branch main has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=ff92a03616c5caec5ce0c42dd76722e1b6dc9e51
commit ff92a03616c5caec5ce0c42dd76722e1b6dc9e51
Author: Kyle Evans <kevans at FreeBSD.org>
AuthorDate: 2021-03-15 12:31:09 +0000
Commit: Kyle Evans <kevans at FreeBSD.org>
CommitDate: 2021-03-15 12:36:02 +0000
if_wg: fix build with DIAGNOSTICS
This file got resynced with OpenBSD to pick up fixes that had taken
place after the version initially ported to FreeBSD. KASSERT there is
more like MPASS here.
Reported by: David Wolfskill <david at catwhisker.org>
---
sys/dev/if_wg/wg_noise.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/dev/if_wg/wg_noise.c b/sys/dev/if_wg/wg_noise.c
index 373a8578a9f3..ae527eb99bde 100644
--- a/sys/dev/if_wg/wg_noise.c
+++ b/sys/dev/if_wg/wg_noise.c
@@ -784,10 +784,10 @@ noise_kdf(uint8_t *a, uint8_t *b, uint8_t *c, const uint8_t *x,
uint8_t sec[BLAKE2S_HASH_SIZE];
#ifdef DIAGNOSTIC
- KASSERT(a_len <= BLAKE2S_HASH_SIZE && b_len <= BLAKE2S_HASH_SIZE &&
+ MPASS(a_len <= BLAKE2S_HASH_SIZE && b_len <= BLAKE2S_HASH_SIZE &&
c_len <= BLAKE2S_HASH_SIZE);
- KASSERT(!(b || b_len || c || c_len) || (a && a_len));
- KASSERT(!(c || c_len) || (b && b_len));
+ MPASS(!(b || b_len || c || c_len) || (a && a_len));
+ MPASS(!(c || c_len) || (b && b_len));
#endif
/* Extract entropy from "x" into sec */
More information about the dev-commits-src-main
mailing list