* mips-tdep.c (mips_read_processor_type): Add parens around
authorFred Fish <fnf@specifix.com>
Tue, 30 Jul 1996 06:15:13 +0000 (06:15 +0000)
committerFred Fish <fnf@specifix.com>
Tue, 30 Jul 1996 06:15:13 +0000 (06:15 +0000)
bitwise-and operands in comparison; previous expression always
evaluated to 0 because of equality comparison of two constants.

gdb/ChangeLog
gdb/mips-tdep.c

index d60d61e35d604fdce60a127cbced6e1bcc4dfcc9..f901c0caae048b15aae273c6aa7ea4f26417a5c2 100644 (file)
@@ -1,5 +1,9 @@
 Mon Jul 29 21:13:20 1996  Fred Fish  <fnf@cygnus.com>
 
+       * mips-tdep.c (mips_read_processor_type): Add parens around
+       bitwise-and operands in comparison; previous expression always
+       evaluated to 0 because of equality comparison of two constants.
+
        * rs6000-tdep.c (skip_prologue): Add missing parens around
        operands of logical-or so that first operand does not bind
        to previous logical-and.
index 427e0f68d630fb61f7a439f06ae36292ce77aad0..6a37d1a44b36a10565d0bed5cc0ceba3e394666c 100644 (file)
@@ -1505,7 +1505,7 @@ mips_read_processor_type ()
 
   prid = read_register (PRID_REGNUM);
 
-  if (prid & ~0xf == 0x700)
+  if ((prid & ~0xf) == 0x700)
     return savestring ("r3041", strlen("r3041"));
 
   return NULL;