modules: BOOL vs. int
Stefan (metze) Metzmacher
metze at metzemix.de
Thu Mar 27 07:30:04 GMT 2003
At 08:23 27.03.2003 +0100, Stefan (metze) Metzmacher wrote:
>Hi Jelmer,
>
>I noticed that all smb_register_*() fn's return BOOL
>and the init_module() fn's returns int
>so this is wrong:
>
>int pdb_xml_init(void)
>{
> return smb_register_passdb("xml", xmlsam_init,
> PASSDB_INTERFACE_VERSION);
>}
btw: I know the BOOL and int are the same after the precompiler scans the code.
but the logic is:
BOOL:
success True !=0
failure False ==0
int:
success 0 (==0)
failure -1 (!=0)
in lib/module.c
are also such usages of True/False with int
(I think that is very confusing for when I read the code)
metze
-----------------------------------------------------------------------------
Stefan "metze" Metzmacher <metze at metzemix.de>
More information about the samba-technical
mailing list