This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]