aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-12-14 12:22:58 -0700
committerTom Tromey <tromey@adacore.com>2022-12-15 12:13:29 -0700
commitc573941878c15ecd8f0985cbe3fb8370abe4c807 (patch)
treed91a9c794cf4ccfde7a4590a8d352f98c9665222 /gdb/utils.c
parent38665d717a3e65c70e6432243d5eed9728a4888a (diff)
downloadgdb-c573941878c15ecd8f0985cbe3fb8370abe4c807.zip
gdb-c573941878c15ecd8f0985cbe3fb8370abe4c807.tar.gz
gdb-c573941878c15ecd8f0985cbe3fb8370abe4c807.tar.bz2
Remove subset_compare
I stumbled across subset_compare today, and after looking at the callers I realized it could be removed and replaced with calls to startswith. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index c37d9ad..5c110da 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -3109,26 +3109,6 @@ streq (const char *lhs, const char *rhs)
-/*
- ** subset_compare()
- ** Answer whether string_to_compare is a full or partial match to
- ** template_string. The partial match must be in sequence starting
- ** at index 0.
- */
-int
-subset_compare (const char *string_to_compare, const char *template_string)
-{
- int match;
-
- if (template_string != NULL && string_to_compare != NULL
- && strlen (string_to_compare) <= strlen (template_string))
- match =
- (startswith (template_string, string_to_compare));
- else
- match = 0;
- return match;
-}
-
static void
show_debug_timestamp (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)