aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwelinder@troll.com <welinder@troll.com>2004-09-03 15:35:30 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:03:03 -0700
commitd83c2cb73289896d4a2ad2b7d10503c1b4f9fcac (patch)
tree4eea109bd8d9ec4ea7897aa3136cd37fd078e7d0 /pre-process.c
parentMake sure to handle TOKEN_STREAMEND even inside a false conditional. (diff)
downloadsparse-d83c2cb73289896d4a2ad2b7d10503c1b4f9fcac.tar.gz
sparse-d83c2cb73289896d4a2ad2b7d10503c1b4f9fcac.tar.bz2
sparse-d83c2cb73289896d4a2ad2b7d10503c1b4f9fcac.zip
symbol.c:
Make eval_init_table static. pre-process.c: Fix match_string_ident.
Diffstat (limited to 'pre-process.c')
-rw-r--r--pre-process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pre-process.c b/pre-process.c
index 138f793..d49accd 100644
--- a/pre-process.c
+++ b/pre-process.c
@@ -65,7 +65,7 @@ static const char **gcc_includepath = includepath + 2;
*/
int match_string_ident(struct ident *ident, const char *str)
{
- return !str[ident->len] && !memcmp(str, ident->name, ident->len);
+ return !strncmp(str, ident->name, ident->len) && !str[ident->len];
}
static struct token *alloc_token(struct position *pos)