summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_prot.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2017-09-27 06:45:00 +0000
committerderaadt <deraadt@openbsd.org>2017-09-27 06:45:00 +0000
commit1f6a3d241f0a0f36261bff553c585a6e34f65ac4 (patch)
treeba6f47c413c189e6213af0a45342d3e417ad7529 /sys/kern/kern_prot.c
parentXr; from jan stary (diff)
downloadwireguard-openbsd-1f6a3d241f0a0f36261bff553c585a6e34f65ac4.tar.xz
wireguard-openbsd-1f6a3d241f0a0f36261bff553c585a6e34f65ac4.zip
guenther sleep-commited the version without #ifdefs
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r--sys/kern/kern_prot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 27061d1e4e6..0829c8f5f59 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_prot.c,v 1.70 2017/09/27 05:43:55 guenther Exp $ */
+/* $OpenBSD: kern_prot.c,v 1.71 2017/09/27 06:45:00 deraadt Exp $ */
/* $NetBSD: kern_prot.c,v 1.33 1996/02/09 18:59:42 christos Exp $ */
/*
@@ -1075,8 +1075,10 @@ sys___set_tcb(struct proc *p, void *v, register_t *retval)
} */ *uap = v;
void *tcb = SCARG(uap, tcb);
+#ifdef TCB_INVALID
if (TCB_INVALID(tcb))
return EINVAL;
+#endif /* TCB_INVALID */
TCB_SET(p, tcb);
return (0);
}