xmllite: Use BOOL type where appropriate

Frédéric Delanoy frederic.delanoy at gmail.com
Thu Oct 10 09:59:06 CDT 2013


On Thu, Oct 10, 2013 at 12:40 PM, Nikolay Sivov <bunglehead at gmail.com> wrote:
> On 10/10/2013 00:36, Frédéric Delanoy wrote:
>>
>> ---
>>   dlls/xmllite/reader.c | 16 ++++++++--------
>>   1 file changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c
>> index 0a4423c..a216951 100644
>> --- a/dlls/xmllite/reader.c
>> +++ b/dlls/xmllite/reader.c
>> @@ -726,7 +726,7 @@ static void readerinput_grow(xmlreaderinput
>> *readerinput, int length)
>>       }
>>   }
>>   -static inline int readerinput_is_utf8(xmlreaderinput *readerinput)
>> +static inline BOOL readerinput_is_utf8(xmlreaderinput *readerinput)
>
> I don't actually see what this will achieve, but I see such patches are
> accepted. Is it a new style rule?

Basically cleanup/clarity. Using boolean values when expressing
logical expressions results does make sense (and it makes the intent
clearer) IMHO.
The fact that it translates to integer values is just a C
implementation/design detail.

Why using an integer type when one only needs one of two truth values
like TRUE/FALSE?

-- 
Frédéric Delanoy



More information about the wine-devel mailing list