public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: <liqingqing3@huawei.com>
Cc: <libc-alpha@sourceware.org>,  <hushiyuan@huawei.com>
Subject: Re: [PATCH] math: enhance the endloop condition of function handle_input_flag found that the endloop condition is not correct, cause when the loop variable " i " euqal to 16, than the input_flags[16] will be out of bounds. though i think for now the inputs maybe all right, but just enhanced it.
Date: Wed, 23 Oct 2019 11:06:00 -0000	[thread overview]
Message-ID: <878spbhgbi.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <20191023104737.1048-1-liqingqing3@huawei.com> (liqingqing3@huawei.com's message of "Wed, 23 Oct 2019 18:47:37 +0800")

> From: l00283554 <liqingqing3@huawei.com>
>
> ---
>  math/gen-auto-libm-tests.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/math/gen-auto-libm-tests.c b/math/gen-auto-libm-tests.c
> index f15af29..08684c4 100644
> --- a/math/gen-auto-libm-tests.c
> +++ b/math/gen-auto-libm-tests.c
> @@ -1298,7 +1298,7 @@ handle_input_flag (char *arg, input_flag *flag,
>    char c = *ep;
>    *ep = 0;
>    bool found = false;
> -  for (input_flag_type i = flag_first_flag; i <= num_input_flag_types; i++)
> +  for (input_flag_type i = flag_first_flag; i < num_input_flag_types; i++)
>      {
>        if (strcmp (arg, input_flags[i]) == 0)
>  	{

I think the change looks good.  Would you please resubmit it with a
properly formatted commit message?  Thanks.

Florian

      reply	other threads:[~2019-10-23 11:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23 10:47 liqingqing3
2019-10-23 11:06 ` Florian Weimer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878spbhgbi.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=hushiyuan@huawei.com \
    --cc=libc-alpha@sourceware.org \
    --cc=liqingqing3@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).