diff options
author | Martin Liska <mliska@suse.cz> | 2021-03-23 10:02:04 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-03-23 10:05:57 +0100 |
commit | 2dc8e345200ad43d702f09f8024320db4cea6e72 (patch) | |
tree | 4c290cd24f5ea5af9427e7e995e853859d740157 /gdb/rust-exp.y | |
parent | 0d46d1a59935860a341fb11eabd7e21a239ba2bb (diff) | |
download | binutils-gdb-2dc8e345200ad43d702f09f8024320db4cea6e72.tar.gz |
Use startswith in gdb subfolder.users/marxin/startswith
ChangeLog:
* gdb/cp-name-parser.y: Use startswith instead of strncmp.
* gdb/m2-exp.y: Likewise.
* gdb/macroexp.c (substitute_args): Likewise.
* gdb/mi/mi-main.c (command_notifies_uscc_observer): Likewise.
* gdb/rust-exp.y: Likewise.
Diffstat (limited to 'gdb/rust-exp.y')
-rw-r--r-- | gdb/rust-exp.y | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y index 04003409887..3750af0dc34 100644 --- a/gdb/rust-exp.y +++ b/gdb/rust-exp.y @@ -1986,7 +1986,7 @@ munge_name_and_block (const char **name, const struct block **block) { /* If it is a global reference, skip the current block in favor of the static block. */ - if (strncmp (*name, "::", 2) == 0) + if (startswith (*name, "::")) { *name += 2; *block = block_static_block (*block); |