public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] kconfig: make hexadecimal prefix mandatory for S_HEX default value
@ 2010-12-05  6:29 Arnaud Lacombe
  2010-12-05  6:29 ` [PATCH 2/5] kconfig: add more S_INT and S_HEX consistency checks Arnaud Lacombe
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Arnaud Lacombe @ 2010-12-05  6:29 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Arnaud Lacombe

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))
-- 
1.7.2.30.gc37d7.dirty


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-12-15 22:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox