[EMAIL PROTECTED], le Mon 25 Aug 2008 21:59:02 +0200, a écrit :
> On Fri, Aug 22, 2008 at 11:46:52AM +0200, Da Zheng wrote:
> > [EMAIL PROTECTED] 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