bug-hurd
[Top][All Lists]
Advanced

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

Re: The patch of glibc which allows the user to override the pfinet serv


From: olafBuddenhagen
Subject: Re: The patch of glibc which allows the user to override the pfinet server
Date: Mon, 25 Aug 2008 21:59:02 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

hi,

On Fri, Aug 22, 2008 at 11:46:52AM +0200, Da Zheng wrote:
> olafBuddenhagen@gmx.net wrote:
>> On Tue, Aug 19, 2008 at 03:27:06PM +0200, zhengda wrote:

>>> -  socket_t server;
>>> +  socket_t server = MACH_PORT_NULL;
>>
>> As I already said, this is unnecessary -- it will be assigned
>> unconditionally.
>>   
> It's necessary here. If __asprintf() returns -1, the function jumps to
> out, cleans up and returns.

Well, it should return an error code, and any values passed back from
the function are unspecified -- it's quite normal that functions don't
try to set "sane" values upon failure...

OTOH, it's not a big issue if it sets it I guess.

>>>        if (domain <= max_domain)
>>> -      servers[domain] = server;
>>> +   servers[domain] = server;
>>
>> I'm not sure about this, but I think it is usually better to avoid
>> changing the indentation of code you haven't otherwise touched -- even
>> if it was wrong before...
>>   
> As I remember, you asked me to fix the indentation problem...

I don't think so. IIRC you already changed the indentation in the first
variant of your patch, and I just pointed out that it is wrong after the
change -- which turned out to be because of your mail client mangling
it... I never meant to imply that it's right to change the indentation
of this line in the first place ;-)

-antrik-




reply via email to

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