From: Michal Marek <mmarek@suse.cz>
To: Arnaud Lacombe <lacombar@gmail.com>
Cc: linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 1/5] kconfig: make hexadecimal prefix mandatory for S_HEX default value
Date: Wed, 15 Dec 2010 23:49:48 +0100 [thread overview]
Message-ID: <20101215224948.GC21436@pobox.suse.cz> (raw)
In-Reply-To: <1291530566-23531-1-git-send-email-lacombar@gmail.com>
On Sun, Dec 05, 2010 at 01:29:24AM -0500, Arnaud Lacombe wrote:
> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
> ---
> scripts/kconfig/symbol.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
> index af6e9f3..ad7dbe7 100644
> --- a/scripts/kconfig/symbol.c
> +++ b/scripts/kconfig/symbol.c
> @@ -548,8 +548,10 @@ bool sym_string_valid(struct symbol *sym, const char *str)
> }
> return true;
> case S_HEX:
> - if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X'))
> - str += 2;
> + if (str[0] != '\0' &&
> + !(str[0] == '0' && (str[1] == 'x' || str[1] == 'X')))
> + return false;
> + str += 2;
> ch = *str++;
> do {
> if (!isxdigit(ch))
I think that saying "hex" is enough to express that the value is to be
interpreted in hexadecimal, so let's keep the 0x prefix optional.
Kconfig prints enough warnings these days... ;)
Michal
prev parent reply other threads:[~2010-12-15 22:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-05 6:29 [PATCH 1/5] kconfig: make hexadecimal prefix mandatory for S_HEX default value Arnaud Lacombe
2010-12-05 6:29 ` [PATCH 2/5] kconfig: add more S_INT and S_HEX consistency checks Arnaud Lacombe
2010-12-15 6:20 ` Arnaud Lacombe
2010-12-15 22:47 ` Michal Marek
2010-12-05 6:29 ` [PATCH 3/5 to 5/5] Add missing hexadicimal prefix Arnaud Lacombe
2010-12-15 6:22 ` [PATCH 1/5] kconfig: make hexadecimal prefix mandatory for S_HEX default value Arnaud Lacombe
2010-12-15 22:49 ` Michal Marek [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=20101215224948.GC21436@pobox.suse.cz \
--to=mmarek@suse.cz \
--cc=lacombar@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
/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