summaryrefslogtreecommitdiffstats
path: root/sys/net/radix.h
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2004-04-18 11:48:35 +0000
committerluigi <luigi@FreeBSD.org>2004-04-18 11:48:35 +0000
commitc8ac6abb75931d2948900c202534a9719eca63ce (patch)
tree02afcc6ae9b4c55e795ae1d3989cec49e17c42c9 /sys/net/radix.h
parentf2ac9cb85499117348c618f70c676558700caf4f (diff)
downloadFreeBSD-src-c8ac6abb75931d2948900c202534a9719eca63ce.zip
FreeBSD-src-c8ac6abb75931d2948900c202534a9719eca63ce.tar.gz
+ 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.
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 de79f82..2796b9d4 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);
OpenPOWER on IntegriCloud