mirror of https://gitee.com/openkylin/qemu.git
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>
This commit is contained in:
parent
b4bd0b168e
commit
79e7e937bd
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue