[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 14/22] libelf: use C99 bool for booleans



>>> On 11.06.13 at 00:09, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> On 07/06/13 19:27, Ian Jackson wrote:
>> @@ -46,7 +46,7 @@ static void log_callback(struct elf_binary *elf, void 
>> *caller_data,
>>  
>>  void xc_elf_set_logfile(xc_interface *xch, struct elf_binary *elf,
>>                          int verbose) {
>> -    elf_set_log(elf, log_callback, xch, verbose);
>> +    elf_set_log(elf, log_callback, xch, verbose /* convert to bool */);
> 
> Change the function prototype from int verbose to bool verbose ?
> 
> If not, for API reasons, then use !!verbose to correctly convert an
> integer to a boolean.

A compiler implementing _Bool ought to be doing the conversion
without need to use !! in the source.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.