aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2020-10-09 13:30:48 -0700
committerJoel Brobecker <brobecker@adacore.com>2020-10-09 13:31:07 -0700
commit59c8a30b81e400d614fad67ec06e040cb38980bc (patch)
treefafed1c292c024c44795c33a3482112a77a5b9d9 /gdb/ada-lang.c
parent7c184d334adac03eb200b0f8b01edaf051bfc01b (diff)
downloadgdb-59c8a30b81e400d614fad67ec06e040cb38980bc.zip
gdb-59c8a30b81e400d614fad67ec06e040cb38980bc.tar.gz
gdb-59c8a30b81e400d614fad67ec06e040cb38980bc.tar.bz2
ada-lang.c::advance_wild_match improve doc and parameter+temporaries types
This commit fixes the type of one of the parameters as well as a couple of temporaries. While at it, the function's description is slightly rewritten to make it a little clearer what the function does. gdb/ChangeLog: * ada-lang.c (advance_wild_match): Rewrite the function's description. Change the type of target0, t0 and t1 to char.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index fbce14b..be6d0e1 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -186,7 +186,7 @@ static int equiv_types (struct type *, struct type *);
static int is_name_suffix (const char *);
-static int advance_wild_match (const char **, const char *, int);
+static int advance_wild_match (const char **, const char *, char);
static bool wild_match (const char *name, const char *patn);
@@ -5921,18 +5921,18 @@ is_valid_name_for_wild_match (const char *name0)
return 1;
}
-/* Advance *NAMEP to next occurrence of TARGET0 in the string NAME0
- that could start a simple name. Assumes that *NAMEP points into
- the string beginning at NAME0. */
+/* Advance *NAMEP to next occurrence in the string NAME0 of the TARGET0
+ character which could start a simple name. Assumes that *NAMEP points
+ somewhere inside the string beginning at NAME0. */
static int
-advance_wild_match (const char **namep, const char *name0, int target0)
+advance_wild_match (const char **namep, const char *name0, char target0)
{
const char *name = *namep;
while (1)
{
- int t0, t1;
+ char t0, t1;
t0 = *name;
if (t0 == '_')