Skip to content

Commit 6aa3f13

Browse files
committed
VHDL: use the combination of strncasecmp and vStringLength instead of strcasecmp
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent 475e250 commit 6aa3f13

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

parsers/vhdl.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,8 @@ static bool isIdentifierMatch (const tokenInfo * const token,
350350
const char *name)
351351
{
352352
return (bool) (isType (token, TOKEN_IDENTIFIER) &&
353-
strcasecmp (vStringValue (token->string), name) == 0);
354-
/* XXX this is copy/paste from eiffel.c and slightly modified */
355-
/* shouldn't we use strNcasecmp ? */
353+
strncasecmp (vStringValue (token->string), name,
354+
vStringLength (token->string)) == 0);
356355
}
357356

358357
static bool isSemicolonOrKeywordOrIdent (const tokenInfo * const token,

0 commit comments

Comments
 (0)