* read.c (read_a_source_file): Rearrange evaluation order when
authorHans-Peter Nilsson <hp@axis.com>
Wed, 12 Nov 2008 01:41:12 +0000 (01:41 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Wed, 12 Nov 2008 01:41:12 +0000 (01:41 +0000)
looking for '=' to avoid conditional on undefined contents of
input_line_pointer[1].

gas/ChangeLog
gas/read.c

index c89a192683d63e9584cb8c002103a1f50cb64469..6857babbf13706aace89ae2b126e25f416c2c95e 100644 (file)
@@ -1,3 +1,9 @@
+2008-11-12  Hans-Peter Nilsson  <hp@axis.com>
+
+       * read.c (read_a_source_file): Rearrange evaluation order when
+       looking for '=' to avoid conditional on undefined contents of
+       input_line_pointer[1].
+
 2008-11-06  Adam Nemet  <anemet@caviumnetworks.com>
 
        * config/tc-mips.c (COP_INSN): Change logic to always return false
index 121c97ad1c574bab75c8c98aca693cb888f097b1..1cf5e9a02eec8cdefc70cdb15bc2b05c22a2a438 100644 (file)
@@ -791,10 +791,10 @@ read_a_source_file (char *name)
                  /* Input_line_pointer->after ':'.  */
                  SKIP_WHITESPACE ();
                }
-              else if (input_line_pointer[1] == '='
-                      && (c == '='
-                          || ((c == ' ' || c == '\t')
-                              && input_line_pointer[2] == '=')))
+              else if ((c == '=' && input_line_pointer[1] == '=')
+                      || ((c == ' ' || c == '\t')
+                          && input_line_pointer[1] == '='
+                          && input_line_pointer[2] == '='))
                {
                  equals (s, -1);
                  demand_empty_rest_of_line ();