Return value in cli_initialise wrong?

Tim Potter tpot at valinux.com
Thu Jun 14 00:08:03 GMT 2001


Joe Doran writes:

> On my hunt to find sspool hanging, memory problems I have been poking
> around in name resolution functions eg namequery.c, I have come across
> cli_intialise call in client connect. The function is requiring a
> boolean false, however the function itself or at least the only
> reference I can find returns NULL.
> 
> Is this correct or should it be checking for NULL on return?
> and if NULL should functions below also be so.

>         if(cli_initialise(cli) == False) {

Well False is equal to zero which is equal to NULL so testing a
pointer against False should be the same as testing it against
NULL.  It's a bit confusing though.

Fixed in CVS.


Thanks,

Tim.




More information about the samba-technical mailing list