diff options
author | 2013-01-29 19:55:48 +0000 | |
---|---|---|
committer | 2013-01-29 19:55:48 +0000 | |
commit | 6aa35f1f0930dca777d985796cf585e84dbae994 (patch) | |
tree | 18d9b440a682a7bdb3b5216ace391352df3909b4 /sys/uvm/uvm_pmemrange.c | |
parent | Remove short-circuit build stuff that went in by accident in 1.17; drahn (diff) | |
download | wireguard-openbsd-6aa35f1f0930dca777d985796cf585e84dbae994.tar.xz wireguard-openbsd-6aa35f1f0930dca777d985796cf585e84dbae994.zip |
7 &&'ed elements in a single KASSERT involving complex tests is just painful
when you hit it. Separate out these tests.
ok millert@ kettenis@, phessler@, with miod@ bikeshedding.
Diffstat (limited to 'sys/uvm/uvm_pmemrange.c')
-rw-r--r-- | sys/uvm/uvm_pmemrange.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/uvm/uvm_pmemrange.c b/sys/uvm/uvm_pmemrange.c index 2b7bc632a62..24cf10c4e94 100644 --- a/sys/uvm/uvm_pmemrange.c +++ b/sys/uvm/uvm_pmemrange.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pmemrange.c,v 1.35 2013/01/21 18:25:27 beck Exp $ */ +/* $OpenBSD: uvm_pmemrange.c,v 1.36 2013/01/29 19:55:48 beck Exp $ */ /* * Copyright (c) 2009, 2010 Ariane van der Steldt <ariane@stack.nl> @@ -735,13 +735,14 @@ uvm_pmr_getpages(psize_t count, paddr_t start, paddr_t end, paddr_t align, /* * Validate arguments. */ - KASSERT(count > 0 && - (start == 0 || end == 0 || start < end) && - align >= 1 && powerof2(align) && - maxseg > 0 && - (boundary == 0 || powerof2(boundary)) && - (boundary == 0 || maxseg * boundary >= count) && - TAILQ_EMPTY(result)); + KASSERT(count > 0); + KASSERT(start == 0 || end == 0 || start < end); + KASSERT(align >= 1); + KASSERT(powerof2(align)); + KASSERT(maxseg > 0); + KASSERT(boundary == 0 || powerof2(boundary)); + KASSERT(boundary == 0 || maxseg * boundary >= count); + KASSERT(TAILQ_EMPTY(result)); /* * TRYCONTIG is a noop if you only want a single segment. |