aboutsummaryrefslogtreecommitdiff
path: root/sys/net/radix.h
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2004-04-18 11:48:35 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2004-04-18 11:48:35 +0000
commit485b4cba56c3bf4231dd5fb6d2eda9cf4522135e (patch)
tree02afcc6ae9b4c55e795ae1d3989cec49e17c42c9 /sys/net/radix.h
parent6b96f1af6d30a924d843ea9b6aa2d35568e844bc (diff)
downloadsrc-485b4cba56c3bf4231dd5fb6d2eda9cf4522135e.tar.gz
src-485b4cba56c3bf4231dd5fb6d2eda9cf4522135e.zip
+ move MKGet()/MKFree() into the only file that can use them.
+ remove useless wrappers around bcmp(), bcopy(), bzero(). The code assumes that bcmp() returns 0 if the size is 0, but this is true for both the libc and the libkern versions. + nuke Bcmp, Bzero, Bcopy from radix.h now that nobody uses them anymore.
Notes
Notes: svn path=/head/; revision=128401
Diffstat (limited to 'sys/net/radix.h')
-rw-r--r--sys/net/radix.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/sys/net/radix.h b/sys/net/radix.h
index de79f82a76b2..2796b9d420d4 100644
--- a/sys/net/radix.h
+++ b/sys/net/radix.h
@@ -100,15 +100,6 @@ struct radix_mask {
#define rm_mask rm_rmu.rmu_mask
#define rm_leaf rm_rmu.rmu_leaf /* extra field would make 32 bytes */
-#define MKGet(m) {\
- if (rn_mkfreelist) {\
- m = rn_mkfreelist; \
- rn_mkfreelist = (m)->rm_mklist; \
- } else \
- R_Malloc(m, struct radix_mask *, sizeof (*(m))); }\
-
-#define MKFree(m) { (m)->rm_mklist = rn_mkfreelist; rn_mkfreelist = (m);}
-
typedef int walktree_f_t(struct radix_node *, void *);
struct radix_node_head {
@@ -145,16 +136,10 @@ struct radix_node_head {
};
#ifndef _KERNEL
-#define Bcmp(a, b, n) bcmp(((char *)(a)), ((char *)(b)), (n))
-#define Bcopy(a, b, n) bcopy(((char *)(a)), ((char *)(b)), (unsigned)(n))
-#define Bzero(p, n) bzero((char *)(p), (int)(n));
#define R_Malloc(p, t, n) (p = (t) malloc((unsigned int)(n)))
#define R_Zalloc(p, t, n) (p = (t) calloc(1,(unsigned int)(n)))
#define Free(p) free((char *)p);
#else
-#define Bcmp(a, b, n) bcmp(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
-#define Bcopy(a, b, n) bcopy(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
-#define Bzero(p, n) bzero((caddr_t)(p), (unsigned)(n));
#define R_Malloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_NOWAIT))
#define R_Zalloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_NOWAIT | M_ZERO))
#define Free(p) free((caddr_t)p, M_RTABLE);