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: Samuel Thibault
Subject: Re: The patch of glibc which allows the user to override the pfinet server
Date: Tue, 26 Aug 2008 10:13:48 +0100
User-agent: Mutt/1.5.12-2006-07-14

olafBuddenhagen@gmx.net, le Mon 25 Aug 2008 21:59:02 +0200, a écrit :
> 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...

Sure, but the error code _is_ server being MACH_PORT_NULL ;)

Samuel




reply via email to

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