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: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH 1/2] slirp: remove duplicate definition
Date: Wed, 15 Feb 2012 10:48:16 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2012-02-15 10:38, Michael S. Tsirkin wrote:
> 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
> 

This is a total mess, I agree, and I'd warmly welcome patches to clean
this up.

I can only speculate on the reasons. Maybe the intention was to keep the
core minimally modified and wrap all the conflicts it causes away. Given
that slirp outside QEMU is dead, this is no longer a valid reason (if it
ever was).

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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