[Freeipa-devel] [PATCH] add dynamic hash table data structure implementation

John Dennis jdennis at redhat.com
Fri Apr 17 03:17:18 UTC 2009


Simo Sorce wrote:
> On Thu, 2009-04-16 at 18:14 -0400, John Dennis wrote:
>   
>> This adds a dynamic hash table data structure to our common code area.
>>     
>
> Still reading the patch, but one thing jumped out immediately.
> Why are you defining TRUE and FALSE and declaring functions as int ?
>   
Most of the functions are declared as returning int because they return 
integer error codes, not booleans. There is only one public function 
returning a boolean. However there are several internal functions 
returning a logical boolean value as an int. Each of these could be 
modified to return a bool instead.
> Why don't you use bool, true and false ?
>   
Good catch, I should use bool. I guess that's what happens when you've 
already been programming in a language for years before a feature is 
added, I still think in terms of zero and non-zero when programming in C :-)


-- 
John Dennis <jdennis at redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090416/f53e728b/attachment.htm>


More information about the Freeipa-devel mailing list