mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
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>
This commit is contained in:
20
gdb/utils.c
20
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)
|
||||
|
Reference in New Issue
Block a user