diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2012-02-17 14:39:30 +0100 |
---|---|---|
committer | Jan Kiszka <jan.kiszka@siemens.com> | 2012-02-27 14:54:49 +0100 |
commit | 79e7e937bd59ba8c4caaa08963712df2506adf8b (patch) | |
tree | 8d82c74c4fcc3fc1f68c49fe7cca6484379da19a | |
parent | b4bd0b168e9f4898b98308f4a8a089f647a86d16 (diff) | |
download | qemu-79e7e937bd59ba8c4caaa08963712df2506adf8b.zip qemu-79e7e937bd59ba8c4caaa08963712df2506adf8b.tar.gz qemu-79e7e937bd59ba8c4caaa08963712df2506adf8b.tar.bz2 |
slirp: Clean up ifs_init
Remove duplicate ifs_init macros, reimplement the logic as static inline
in mbuf.h.
CC: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
CC: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
-rw-r--r-- | slirp/if.c | 2 | ||||
-rw-r--r-- | slirp/if.h | 2 | ||||
-rw-r--r-- | slirp/mbuf.h | 5 |
3 files changed, 5 insertions, 4 deletions
@@ -8,8 +8,6 @@ #include <slirp.h> #include "qemu-timer.h" -#define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm)) - static void ifs_insque(struct mbuf *ifm, struct mbuf *ifmhead) { @@ -20,6 +20,4 @@ /* 2 for alignment, 14 for ethernet, 40 for TCP/IP */ #define IF_MAXLINKHDR (2 + 14 + 40) -#define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm)) - #endif diff --git a/slirp/mbuf.h b/slirp/mbuf.h index 0708840..8d7951f 100644 --- a/slirp/mbuf.h +++ b/slirp/mbuf.h @@ -124,4 +124,9 @@ void m_adj(struct mbuf *, int); int m_copy(struct mbuf *, struct mbuf *, int, int); struct mbuf * dtom(Slirp *, void *); +static inline void ifs_init(struct mbuf *ifm) +{ + ifm->ifs_next = ifm->ifs_prev = ifm; +} + #endif |