This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] is_name_suffix("") is always non-zero
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: gdb-patches at sourceware dot org
- Date: Sat, 26 Feb 2011 23:16:25 +0100
- Subject: [PATCH] is_name_suffix("") is always non-zero
is_name_suffix always returns non-zero when called with the empty
string. Probably this should be called with string1 instead.
Andreas.
2011-02-26 Andreas Schwab <schwab@linux-m68k.org>
* ada-lang.c (compare_names): Call is_name_suffix with string1
instead of string2.
--- gdb/ada-lang.c.~1.284.~ 2011-01-21 20:20:53.000000000 +0100
+++ gdb/ada-lang.c 2011-02-26 23:00:31.000000000 +0100
@@ -4740,7 +4740,7 @@ compare_names (const char *string1, cons
case '_':
if (*string2 == '\0')
{
- if (is_name_suffix (string2))
+ if (is_name_suffix (string1))
return 0;
else
return -1;
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."