This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv3 1/3] Refactor tst-strtod-round.c
- From: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 24 May 2016 14:44:08 -0500
- Subject: Re: [PATCHv3 1/3] Refactor tst-strtod-round.c
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1464041464 dot git dot murphyp at linux dot vnet dot ibm dot com> <bc4fe14cc1086e590ea4f86f6e1522a38f29f53b dot 1464041464 dot git dot murphyp at linux dot vnet dot ibm dot com> <alpine dot DEB dot 2 dot 20 dot 1605241509580 dot 23091 at digraph dot polyomino dot org dot uk>
On 05/24/2016 10:12 AM, Joseph Myers wrote:
> On Mon, 23 May 2016, Paul E. Murphy wrote:
>
>> + char *fin_name = argv[1];
>> + char *fout_name = argv[2];
>> +
>> + if (argc < 3)
>> + {
>> + fprintf (stderr, "Usage: %s [input] [output]\n", basename (argv[0]));
>> + return EXIT_FAILURE;
>> + }
>
> The check for argc < 3 should take place before you access argv[1] and
> argv[2] (if no arguments are passed, argv[2] doesn't exist). And you
> shouldn't have [] around "input" and "output" in the message since that
> suggests they are optional, which they aren't (cf. gen-auto-libm-tests
> using <>).
>
> OK with those changes.
>
Requested changes made. Pushed as 118fbf0.