summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2016-07-27 14:48:56 +0000
committertedu <tedu@openbsd.org>2016-07-27 14:48:56 +0000
commita9dcdf4a8690e8e385d4de6f59aba7e8406e40dd (patch)
tree8d65cd1537ad0d945799c90fc51e8a6a1b211c0a
parentincrease the size of forkstat fields to accomodate large values (diff)
downloadwireguard-openbsd-a9dcdf4a8690e8e385d4de6f59aba7e8406e40dd.tar.xz
wireguard-openbsd-a9dcdf4a8690e8e385d4de6f59aba7e8406e40dd.zip
check flags with mask instead of equality, in case we decide to mix
another flag in at some point. ok stefan
-rw-r--r--sys/uvm/uvm_amap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/uvm/uvm_amap.c b/sys/uvm/uvm_amap.c
index 84e56c0e3fc..6e8653ccc8f 100644
--- a/sys/uvm/uvm_amap.c
+++ b/sys/uvm/uvm_amap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_amap.c,v 1.75 2016/07/14 16:23:49 stefan Exp $ */
+/* $OpenBSD: uvm_amap.c,v 1.76 2016/07/27 14:48:56 tedu Exp $ */
/* $NetBSD: uvm_amap.c,v 1.27 2000/11/25 06:27:59 chs Exp $ */
/*
@@ -270,7 +270,7 @@ amap_alloc1(int slots, int waitf, int lazyalloc)
struct vm_amap_chunk *chunk, *tmp;
int chunks, chunkperbucket = 1, hashshift = 0;
int buckets, i, n;
- int pwaitf = (waitf == M_WAITOK) ? PR_WAITOK : PR_NOWAIT;
+ int pwaitf = (waitf & M_WAITOK) ? PR_WAITOK : PR_NOWAIT;
KASSERT(slots > 0);