summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2014-01-13 09:27:39 +0000
committermpi <mpi@openbsd.org>2014-01-13 09:27:39 +0000
commitd25303915427b5ae531a8ab3555c8e8d781b4a1b (patch)
treeeaf4c381d2d941afc23e03670de3f2b1ee26ca50 /sys
parentwarning(), note(), debug(), parse_warn() always return 0, which no (diff)
downloadwireguard-openbsd-d25303915427b5ae531a8ab3555c8e8d781b4a1b.tar.xz
wireguard-openbsd-d25303915427b5ae531a8ab3555c8e8d781b4a1b.zip
Return the poison value in poison_check() and not the modified value.
ok tedu@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_poison.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_poison.c b/sys/kern/subr_poison.c
index 7ead1d549d3..62090621508 100644
--- a/sys/kern/subr_poison.c
+++ b/sys/kern/subr_poison.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_poison.c,v 1.5 2013/05/31 18:29:32 deraadt Exp $ */
+/* $OpenBSD: subr_poison.c,v 1.6 2014/01/13 09:27:39 mpi Exp $ */
/*
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
*
@@ -77,7 +77,7 @@ poison_check(void *v, size_t len, size_t *pidx, int *pval)
for (i = 0; i < len; i++) {
if (ip[i] != poison) {
*pidx = i;
- *pval = ip[i];
+ *pval = poison;
return 1;
}
}