aboutsummaryrefslogtreecommitdiff
path: root/gdb/m2-exp.y
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-03-23 10:02:04 +0100
committerMartin Liska <mliska@suse.cz>2021-04-01 06:29:59 +0200
commit733f5eea6bde8546a4845416457174c6d716e882 (patch)
treee07361cad1bb0c645db507135b7d5ea361a57d26 /gdb/m2-exp.y
parentaf82f89db0f4a9c161a642c201f4618e728b9ff9 (diff)
downloadbinutils-733f5eea6bde8546a4845416457174c6d716e882.zip
binutils-733f5eea6bde8546a4845416457174c6d716e882.tar.gz
binutils-733f5eea6bde8546a4845416457174c6d716e882.tar.bz2
Use startswith in gdb subfolder.
gdb/ChangeLog: * cp-name-parser.y: Use startswith instead of strncmp. * m2-exp.y: Likewise. * macroexp.c (substitute_args): Likewise. * mi/mi-main.c (command_notifies_uscc_observer): Likewise. * rust-exp.y: Likewise.
Diffstat (limited to 'gdb/m2-exp.y')
-rw-r--r--gdb/m2-exp.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index 273270a..b19bbeb 100644
--- a/gdb/m2-exp.y
+++ b/gdb/m2-exp.y
@@ -976,12 +976,12 @@ yylex (void)
else
{
/* Built-in BOOLEAN type. This is sort of a hack. */
- if (strncmp (tokstart, "TRUE", 4) == 0)
+ if (startswith (tokstart, "TRUE"))
{
yylval.ulval = 1;
return M2_TRUE;
}
- else if (strncmp (tokstart, "FALSE", 5) == 0)
+ else if (startswith (tokstart, "FALSE"))
{
yylval.ulval = 0;
return M2_FALSE;