summaryrefslogtreecommitdiff
path: root/gdb/rust-exp.y
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/rust-exp.y')
-rw-r--r--gdb/rust-exp.y2
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);