This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] time/tst-strptime2.c: test full input range +/- 0-9999


On 08/17/2015 01:33 PM, James Perkins wrote:
> -         bool test_string_valid = retval ? 1 : 0;
> +         int test_string_valid = retval ? 1 : 0;
> 
> I'm going to hold a day or two to hear from Carlos first, then post a
> new patchset with the above change.

This is an implicit boolean coercion. Please be explicit about truth 
values e.g. `int test_string_valid = retval > 1 ? 1 : 0;`.

https://sourceware.org/glibc/wiki/Style_and_Conventions#Boolean_Coercions

Other than that, the v5 looks almost ready, and with Mike's suggested
changes I think v6 is probably the final polished version.

c.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]