X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/316670eb35587141e969394ae8537d66b9211e80..39236c6e673c41db228275375ab7fdb0f837b292:/bsd/net/radix.c diff --git a/bsd/net/radix.c b/bsd/net/radix.c index 51c90586a..fdc7058b3 100644 --- a/bsd/net/radix.c +++ b/bsd/net/radix.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 2000-2008 Apple Inc. All rights reserved. + * Copyright (c) 2000-2013 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in @@ -11,10 +11,10 @@ * unlawful or unlicensed copies of an Apple operating system, or to * circumvent, violate, or enable the circumvention or violation of, any * terms of an Apple operating system software license agreement. - * + * * Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -22,7 +22,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ /* @@ -66,14 +66,10 @@ */ #ifndef _RADIX_H_ #include -#ifdef KERNEL #include #include #define M_DONTWAIT M_NOWAIT #include -#else -#include -#endif #include #include #include @@ -898,9 +894,10 @@ on1: m = mm; } if (m) - log(LOG_ERR, - "rn_delete: Orphaned Mask %p at %p\n", - (void *)m, (void *)x); + log(LOG_ERR, "rn_delete: Orphaned Mask " + "0x%llx at 0x%llx\n", + (uint64_t)VM_KERNEL_ADDRPERM(m), + (uint64_t)VM_KERNEL_ADDRPERM(x)); } } /* @@ -1149,14 +1146,13 @@ void rn_init(void) { char *cp, *cplim; -#ifdef KERNEL struct domain *dom; /* lock already held when rn_init is called */ - for (dom = domains; dom; dom = dom->dom_next) + TAILQ_FOREACH(dom, &domains, dom_entry) { 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");