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

James Perkins james@loowit.net
Mon Aug 17 19:52:00 GMT 2015


On Mon, Aug 17, 2015 at 11:23 AM, Carlos O'Donell <carlos@redhat.com> wrote:
> 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

That is definitely useful advice. I think I will use bool anyway in V6.

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

Patch coming shortly.

Cheers,
James



More information about the Libc-alpha mailing list