]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
xtensa: make map_suffix_reloc_to_operator return operatorT
authorTrevor Saunders <tbsaunde+binutils@tbsaunde.org>
Mon, 23 May 2016 04:39:47 +0000 (00:39 -0400)
committerTrevor Saunders <tbsaunde+binutils@tbsaunde.org>
Tue, 24 May 2016 12:57:36 +0000 (08:57 -0400)
It always returns an element of the enum operatorT, so it should be clearer to
make that the return type.

gas/ChangeLog:

2016-05-24  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* config/tc-xtensa.c (struct suffix_reloc_map): Change type of field
operator to operatorT.
(map_suffix_reloc_to_operator): Change return type to operatorT.

gas/ChangeLog
gas/config/tc-xtensa.c

index 48cb3cbe9af8e18e36e3a0d3fc41120d9410b5f1..3fae33862d23fb8e46f63e8fc14e8a09027eaa2e 100644 (file)
@@ -1,3 +1,9 @@
+2016-05-24  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+       * config/tc-xtensa.c (struct suffix_reloc_map): Change type of field
+       operator to operatorT.
+       (map_suffix_reloc_to_operator): Change return type to operatorT.
+
 2016-05-24  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
 
        * config/tc-d30v.c (find_format): Change type of X_op to operatorT.
index 94411c3738e6f63865ae2fc321a7a43cdd0848a3..40137ffd63cc752933a5fb38186f473446f218ff 100644 (file)
@@ -364,7 +364,7 @@ struct suffix_reloc_map
   const char *suffix;
   int length;
   bfd_reloc_code_real_type reloc;
-  unsigned char operator;
+  operatorT operator;
 };
 
 #define SUFFIX_MAP(str, reloc, op) { str, sizeof (str) - 1, reloc, op }
@@ -1773,11 +1773,11 @@ xtensa_elf_suffix (char **str_p, expressionS *exp_p)
 
 
 /* Find the matching operator type.  */
-static unsigned char
+static operatorT
 map_suffix_reloc_to_operator (bfd_reloc_code_real_type reloc)
 {
   struct suffix_reloc_map *sfx;
-  unsigned char operator = (unsigned char) -1;
+  operatorT operator = O_illegal;
 
   for (sfx = &suffix_relocs[0]; sfx->suffix; sfx++)
     {
@@ -1787,7 +1787,7 @@ map_suffix_reloc_to_operator (bfd_reloc_code_real_type reloc)
          break;
        }
     }
-  gas_assert (operator != (unsigned char) -1);
+  gas_assert (operator != O_illegal);
   return operator;
 }