aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
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/mi
parentaf82f89db0f4a9c161a642c201f4618e728b9ff9 (diff)
downloadgdb-733f5eea6bde8546a4845416457174c6d716e882.zip
gdb-733f5eea6bde8546a4845416457174c6d716e882.tar.gz
gdb-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/mi')
-rw-r--r--gdb/mi/mi-main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 988db55..582a554 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -1886,8 +1886,8 @@ command_notifies_uscc_observer (struct mi_parse *command)
if (command->op == CLI_COMMAND)
{
/* CLI commands "thread" and "inferior" already send it. */
- return (strncmp (command->command, "thread ", 7) == 0
- || strncmp (command->command, "inferior ", 9) == 0);
+ return (startswith (command->command, "thread ")
+ || startswith (command->command, "inferior "));
}
else /* MI_COMMAND */
{
@@ -1895,8 +1895,8 @@ command_notifies_uscc_observer (struct mi_parse *command)
&& command->argc > 1)
{
/* "thread" and "inferior" again, but through -interpreter-exec. */
- return (strncmp (command->argv[1], "thread ", 7) == 0
- || strncmp (command->argv[1], "inferior ", 9) == 0);
+ return (startswith (command->argv[1], "thread ")
+ || startswith (command->argv[1], "inferior "));
}
else