On Wed, May 4, 2016 at 12:40 AM, Bernhard Voelker wrote: > On 05/04/2016 05:59 AM, Jim Meyering wrote: >> - bool default_format = (just_user + just_group + just_group_list >> + bool default_format = (0U + just_user + just_group + just_group_list >> + just_context == 0); > > These are all bool - wouldn't it be better to use boolean instead of > arithmetical operators? Thanks for the review. Indeed. Using "0U" there is a bit too much: a hack upon the hack of using addition. While using addition can be seen as slightly more readable (assuming you know the idiom), or even better because the generated code is jump-free, I would argue that this code should be readable, and that whether there is a short-circuiting jump is irrelevant to the performance of id. While it is tempting to use "|" (the code generated by gcc-5.3 -O3 is smaller and still jump-free: https://godbolt.org/g/zqMTtg), that still feels dubious, especially when you remember that with gnulib, we may still be simulating "bool" on some crufty systems. So it seems best to use the bool-appropriate operators. Here's the adjusted patch: