* xcoffread.c (process_xcoff_symbol): ARI fix: Avoid assignment
authorPierre Muller <muller@sourceware.org>
Tue, 19 Apr 2011 14:12:50 +0000 (14:12 +0000)
committerPierre Muller <muller@sourceware.org>
Tue, 19 Apr 2011 14:12:50 +0000 (14:12 +0000)
inside if clause.

gdb/ChangeLog
gdb/xcoffread.c

index c4a98be285f11dbd6c6047963bf0b04f880988cf..dfee35abde215a0fe811175424f7c1a357373067 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+       * xcoffread.c (process_xcoff_symbol): ARI fix: Avoid assignment
+       inside if clause.
+
 2011-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
            Pedro Alves  <pedro@codesourcery.com>
 
index fd60447210dd2646658e6355a4c0419a624afcae..4dd048d5d96f306f17d539461da65748fb06dff1 100644 (file)
@@ -1585,7 +1585,11 @@ process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile)
             where we need to, which is not necessarily super-clean,
             but seems workable enough.  */
 
-         if (*name == ':' || (pp = (char *) strchr (name, ':')) == NULL)
+         if (*name == ':')
+           return NULL;
+
+         pp = (char *) strchr (name, ':');
+         if (pp == NULL)
            return NULL;
 
          ++pp;