bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] maint: Use logical rather than bitwise operators on bools


From: Jim Meyering
Subject: Re: [PATCH] maint: Use logical rather than bitwise operators on bools
Date: Wed, 23 Sep 2009 13:06:11 +0200

Pádraig Brady wrote:
> The attached patch removes the inconsistent use of bitwise
> operators on boolean values.
>
> As well as being distracting, bitwise operators are
> not short circuiting and brittle with C89 where
> bool can be an int, i.e. > 1.
...
> Subject: [PATCH] maint: Use logical rather than bitwise operators on bools
>
> This is because bitwise operators are:
> - distracting and inconsistent in a boolean context
> - non short circuiting
> - brittle in C89 where bool can be an int (so > 1)

Good change.
That looks fine and passes "make check".
Thanks!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]