qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] slirp: remove duplicate definition


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH 1/2] slirp: remove duplicate definition
Date: Wed, 15 Feb 2012 11:38:00 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Feb 15, 2012 at 09:30:23AM +0100, Jan Kiszka wrote:
> On 2012-02-15 09:12, address@hidden wrote:
> > From: Zhi Yong Wu <address@hidden>
> > 
> > Signed-off-by: Zhi Yong Wu <address@hidden>
> > ---
> >  slirp/if.c |    2 --
> >  1 files changed, 0 insertions(+), 2 deletions(-)
> > 
> > diff --git a/slirp/if.c b/slirp/if.c
> > index 2852396..8e0cac2 100644
> > --- a/slirp/if.c
> > +++ b/slirp/if.c
> > @@ -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)
> >  {
> 
> Let's grab the chance and move ifs_init to mbuf.h.
> 
> Jan
> 

Since you mention it - why does slirp have all these
defines in the first place?

slirp/mbuf.h:#define m_nextpkt  m_hdr.mh_nextpkt
slirp/mbuf.h:#define ifs_next m_nextpkt

Seriously, #define for a field name?
This is just crazy, and violates our coding style
which requires macros to be PPER_CAS_WITH_UNDERSCORES

-- 
MST



reply via email to

[Prev in Thread] Current Thread [Next in Thread]