This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2] time/tst-strptime2.c: test full input range +/- 0-9999
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: James Perkins <james at loowit dot net>, GNU libc <libc-alpha at sourceware dot org>, Paul Eggert <eggert at cs dot ucla dot edu>
- Date: Mon, 17 Aug 2015 14:23:10 -0400
- Subject: Re: [PATCH 2/2] time/tst-strptime2.c: test full input range +/- 0-9999
- Authentication-results: sourceware.org; auth=none
- References: <1439667772-16906-1-git-send-email-james at loowit dot net> <1439667772-16906-3-git-send-email-james at loowit dot net> <20150816143119 dot GI12511 at vapier> <CAJ2jFj4AoFWK20K5vdCLVGSzsVXDT_YkeaVB6OYKax5REqcHKw at mail dot gmail dot com>
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.