summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_poison.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-05-19 14:30:03 +0000
committertedu <tedu@openbsd.org>2014-05-19 14:30:03 +0000
commit2d02adf8285b02d67be5c9379a7f5b0c41bae06d (patch)
tree002470ff07d2ea986b86339477bf578411c55ab7 /sys/kern/subr_poison.c
parentAdd some consistency in fuse error handling. We need to return ENXIO (diff)
downloadwireguard-openbsd-2d02adf8285b02d67be5c9379a7f5b0c41bae06d.tar.xz
wireguard-openbsd-2d02adf8285b02d67be5c9379a7f5b0c41bae06d.zip
consistent use of uint32_t for poison values
Diffstat (limited to 'sys/kern/subr_poison.c')
-rw-r--r--sys/kern/subr_poison.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/subr_poison.c b/sys/kern/subr_poison.c
index 62090621508..b815404efef 100644
--- a/sys/kern/subr_poison.c
+++ b/sys/kern/subr_poison.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_poison.c,v 1.6 2014/01/13 09:27:39 mpi Exp $ */
+/* $OpenBSD: subr_poison.c,v 1.7 2014/05/19 14:30:03 tedu Exp $ */
/*
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
*
@@ -36,7 +36,7 @@
#endif
#define POISON_SIZE 64
-int32_t
+uint32_t
poison_value(void *v)
{
ulong l = (u_long)v;
@@ -51,7 +51,7 @@ poison_mem(void *v, size_t len)
{
uint32_t *ip = v;
size_t i;
- int32_t poison;
+ uint32_t poison;
poison = poison_value(v);
@@ -63,11 +63,11 @@ poison_mem(void *v, size_t len)
}
int
-poison_check(void *v, size_t len, size_t *pidx, int *pval)
+poison_check(void *v, size_t len, size_t *pidx, uint32_t *pval)
{
uint32_t *ip = v;
size_t i;
- int32_t poison;
+ uint32_t poison;
poison = poison_value(v);