summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2014-01-19 04:04:36 +0000
committerclaudio <claudio@openbsd.org>2014-01-19 04:04:36 +0000
commit35eec7b3ad8461c7e26ca022e27a2043aec050a2 (patch)
treedc12af3a2d78f94e2d11f780e3f9e65711c3bb45
parentAdjust lexchar position by ugflag once only. (diff)
downloadwireguard-openbsd-35eec7b3ad8461c7e26ca022e27a2043aec050a2.tar.xz
wireguard-openbsd-35eec7b3ad8461c7e26ca022e27a2043aec050a2.zip
Start to reduce the madness in radix.c. This only used by the kernel
since ages so remove the bits used for userland compiles. OK mikeb@
-rw-r--r--sys/net/radix.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/net/radix.c b/sys/net/radix.c
index a8f74b00929..e839c77c166 100644
--- a/sys/net/radix.c
+++ b/sys/net/radix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radix.c,v 1.34 2014/01/10 14:29:08 tedu Exp $ */
+/* $OpenBSD: radix.c,v 1.35 2014/01/19 04:04:36 claudio Exp $ */
/* $NetBSD: radix.c,v 1.20 2003/08/07 16:32:56 agc Exp $ */
/*
@@ -36,19 +36,12 @@
* Routines to build and maintain radix trees for routing lookups.
*/
-#ifndef _NET_RADIX_H_
#include <sys/param.h>
-#ifdef _KERNEL
#include <sys/systm.h>
#include <sys/malloc.h>
-#define M_DONTWAIT M_NOWAIT
#include <sys/domain.h>
-#else
-#include <stdlib.h>
-#endif
#include <sys/syslog.h>
#include <net/radix.h>
-#endif
#ifndef SMALL_KERNEL
#include <sys/socket.h>
@@ -1056,13 +1049,11 @@ void
rn_init()
{
char *cp, *cplim;
-#ifdef _KERNEL
struct domain *dom;
for (dom = domains; dom; dom = dom->dom_next)
if (dom->dom_maxrtkey > max_keylen)
max_keylen = dom->dom_maxrtkey;
-#endif
if (max_keylen == 0) {
log(LOG_ERR,
"rn_init: radix functions require max_keylen be set\n");