From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Rusty Russell <rusty@rustcorp.com.au>,
"H. Peter Anvin" <hpa@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scripts/mod/modpost.c: Fix bug in number_prefix
Date: Wed, 25 Jun 2014 10:26:56 -0400 [thread overview]
Message-ID: <53AADC30.7080401@windriver.com> (raw)
In-Reply-To: <1403685999-31013-1-git-send-email-linux@rasmusvillemoes.dk>
On 14-06-25 04:46 AM, Rasmus Villemoes wrote:
> The function number_prefix() can currently only return 1 if its
> argument is the empty string: If line 3 is reached and *sym (now the
> second character in the argument) is not '.', 0 is returned. However,
> if that character is '.', the first assignment to c is that same '.',
> which obviously fails to be a digit.
I'd suggest you expand the commit log to actually list the end-user
visible symptom and the use case that this actually fixes, since it
isn't obvious to me at all.
Thanks,
Paul.
--
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> ---
> scripts/mod/modpost.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 9d9c5b9..336f45f 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -778,9 +778,9 @@ static const char *sech_name(struct elf_info *elf, Elf_Shdr *sechdr)
> */
> static int number_prefix(const char *sym)
> {
> - if (*sym++ == '\0')
> + if (*sym == '\0')
> return 1;
> - if (*sym != '.')
> + if (*sym++ != '.')
> return 0;
> do {
> char c = *sym++;
>
next prev parent reply other threads:[~2014-06-25 14:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 8:46 [PATCH] scripts/mod/modpost.c: Fix bug in number_prefix Rasmus Villemoes
2014-06-25 14:26 ` Paul Gortmaker [this message]
2014-06-25 22:57 ` Rasmus Villemoes
2014-07-08 23:58 ` Rusty Russell
2014-07-09 7:13 ` Sam Ravnborg
2014-07-09 9:41 ` [PATCH] scripts: modpost: Remove numeric suffix pattern matching Rasmus Villemoes
2014-07-09 20:47 ` Sam Ravnborg
2014-07-10 1:14 ` Rusty Russell
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=53AADC30.7080401@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=rusty@rustcorp.com.au \
/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