]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Don't compare boolean values against TRUE or FALSE
authorAlan Modra <amodra@gmail.com>
Thu, 18 May 2017 05:17:40 +0000 (14:47 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 18 May 2017 05:29:33 +0000 (14:59 +0930)
bfd/
* arc-got.h: Don't compare boolean values against TRUE or FALSE.
* elf-m10300.c: Likewise.
* elf.c: Likewise.
* elf32-arc.c: Likewise.
* elf32-bfin.c: Likewise.
* elf32-m68k.c: Likewise.
* elf32-nds32.c: Likewise.
* elf32-tilepro.c: Likewise.
* elflink.c: Likewise.
* elfnn-aarch64.c: Likewise.
* elfnn-riscv.c: Likewise.
* elfxx-tilegx.c: Likewise.
* mach-o.c: Likewise.
* peXXigen.c: Likewise.
* vms-alpha.c: Likewise.
* vms-lib.c: Likewise.
opcodes/
* aarch64-asm.c: Don't compare boolean values against TRUE or FALSE.
* aarch64-dis.c: Likewise.
* aarch64-gen.c: Likewise.
* aarch64-opc.c: Likewise.
binutils/
* strings.c: Don't compare boolean values against TRUE or FALSE.
gas/
* config/tc-aarch64.c: Don't compare booleans against TRUE or FALSE.
* config/tc-hppa.c: Likewise.
* config/tc-mips.c: Likewise.
* config/tc-score7.c: Likewise.
ld/
* emultempl/elf32.em: Don't compare boolean values against TRUE or FALSE.
* emultempl/pe.em: Likewise.
* emultempl/pep.em: Likewise.
* emultempl/xtensaelf.em: Likewise.

34 files changed:
bfd/ChangeLog
bfd/arc-got.h
bfd/elf-m10300.c
bfd/elf.c
bfd/elf32-arc.c
bfd/elf32-bfin.c
bfd/elf32-m68k.c
bfd/elf32-nds32.c
bfd/elf32-tilepro.c
bfd/elflink.c
bfd/elfnn-aarch64.c
bfd/elfnn-riscv.c
bfd/elfxx-tilegx.c
bfd/mach-o.c
bfd/peXXigen.c
bfd/vms-alpha.c
bfd/vms-lib.c
binutils/ChangeLog
binutils/strings.c
gas/ChangeLog
gas/config/tc-aarch64.c
gas/config/tc-hppa.c
gas/config/tc-mips.c
gas/config/tc-score7.c
ld/ChangeLog
ld/emultempl/elf32.em
ld/emultempl/pe.em
ld/emultempl/pep.em
ld/emultempl/xtensaelf.em
opcodes/ChangeLog
opcodes/aarch64-asm.c
opcodes/aarch64-dis.c
opcodes/aarch64-gen.c
opcodes/aarch64-opc.c

index 31b398216c60dab6a771f30d7202e723ffda918a..a85199a65bfede74b1eb245f66b6d7497406ccc0 100644 (file)
@@ -1,3 +1,22 @@
+2017-05-18  Alan Modra  <amodra@gmail.com>
+
+       * arc-got.h: Don't compare boolean values against TRUE or FALSE.
+       * elf-m10300.c: Likewise.
+       * elf.c: Likewise.
+       * elf32-arc.c: Likewise.
+       * elf32-bfin.c: Likewise.
+       * elf32-m68k.c: Likewise.
+       * elf32-nds32.c: Likewise.
+       * elf32-tilepro.c: Likewise.
+       * elflink.c: Likewise.
+       * elfnn-aarch64.c: Likewise.
+       * elfnn-riscv.c: Likewise.
+       * elfxx-tilegx.c: Likewise.
+       * mach-o.c: Likewise.
+       * peXXigen.c: Likewise.
+       * vms-alpha.c: Likewise.
+       * vms-lib.c: Likewise.
+
 2017-05-17  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/20882
index abf3815bbebd228ee2b98fe34fd79d5a68d3e0ad..b8a6d15a2273cb498e02eb67708bef3c60769157 100644 (file)
@@ -318,7 +318,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry **          list_p,
        }
 
 
-      if (entry && entry->processed == FALSE)
+      if (entry && !entry->processed)
        {
          switch (entry->type)
            {
@@ -427,7 +427,7 @@ create_got_dynrelocs_for_single_entry (struct got_entry *list,
   bfd_vma got_offset = list->offset;
 
   if (list->type == GOT_NORMAL
-      && list->created_dyn_relocation == FALSE)
+      && !list->created_dyn_relocation)
     {
       if (bfd_link_pic (info)
          && h != NULL
@@ -446,7 +446,7 @@ create_got_dynrelocs_for_single_entry (struct got_entry *list,
       list->created_dyn_relocation = TRUE;
     }
   else if (list->existing_entries != TLS_GOT_NONE
-          && list->created_dyn_relocation == FALSE)
+          && !list->created_dyn_relocation)
     {
        /* TODO TLS: This is not called for local symbols.
          In order to correctly implement TLS, this should also
index b0a783a5257bdcb2591147fa366c6a016019e860..e59f083e04de6955b434ab010b8971989e20940f 100644 (file)
@@ -1520,7 +1520,7 @@ mn10300_elf_final_link_relocate (reloc_howto_type *howto,
          /* Do not generate relocs when an R_MN10300_32 has been used
             with an R_MN10300_SYM_DIFF to compute a difference of two
             symbols.  */
-         && is_sym_diff_reloc == FALSE
+         && !is_sym_diff_reloc
          /* Also, do not generate a reloc when the symbol associated
             with the R_MN10300_32 reloc is absolute - there is no
             need for a run time computation in this case.  */
index a08e0f8ea6197f103908364665ec6e5f6c89927d..863bd61c5fa342510e910b81c56827e76919a35a 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7358,7 +7358,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
       for (section = obfd->sections; section != NULL;
           section = section->next)
        {
-         if (section->segment_mark == FALSE)
+         if (!section->segment_mark)
            goto rewrite;
          else
            section->segment_mark = FALSE;
index b00207ed8db9db55fc7d0beadc1017bdc87561c9..3e99cab7361d5f0afcea9413204126533c86fa46 100644 (file)
@@ -1259,7 +1259,7 @@ arc_do_relocation (bfd_byte * contents,
   struct elf_link_hash_table *htab ATTRIBUTE_UNUSED = elf_hash_table (info);
   bfd_reloc_status_type flag;
 
-  if (reloc_data.should_relocate == FALSE)
+  if (!reloc_data.should_relocate)
     return bfd_reloc_ok;
 
   switch (reloc_data.howto->size)
@@ -1464,9 +1464,9 @@ elf_arc_relocate_section (bfd *                     output_bfd,
       h2 = elf_link_hash_lookup (elf_hash_table (info), "__SDATA_BEGIN__",
                                 FALSE, FALSE, TRUE);
 
-      if (reloc_data.sdata_begin_symbol_vma_set == FALSE
-           && h2 != NULL && h2->root.type != bfd_link_hash_undefined
-           && h2->root.u.def.section->output_section != NULL)
+      if (!reloc_data.sdata_begin_symbol_vma_set
+         && h2 != NULL && h2->root.type != bfd_link_hash_undefined
+         && h2->root.u.def.section->output_section != NULL)
        /* TODO: Verify this condition.  */
        {
          reloc_data.sdata_begin_symbol_vma =
@@ -1784,7 +1784,7 @@ elf_arc_relocate_section (bfd *                     output_bfd,
 
                bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
 
-               if (relocate == FALSE)
+               if (!relocate)
                  continue;
              }
            break;
@@ -1793,7 +1793,7 @@ elf_arc_relocate_section (bfd *                     output_bfd,
        }
 
       if (is_reloc_SDA_relative (howto)
-         && (reloc_data.sdata_begin_symbol_vma_set == FALSE))
+         && !reloc_data.sdata_begin_symbol_vma_set)
        {
          _bfd_error_handler
            ("Error: Linker symbol __SDATA_BEGIN__ not found");
@@ -1907,8 +1907,8 @@ elf_arc_check_relocs (bfd *                        abfd,
       howto = arc_elf_howto (r_type);
 
       if (dynobj == NULL
-         && (is_reloc_for_GOT (howto) == TRUE
-             || is_reloc_for_TLS (howto) == TRUE))
+         && (is_reloc_for_GOT (howto)
+             || is_reloc_for_TLS (howto)))
        {
          dynobj = elf_hash_table (info)->dynobj = abfd;
          if (! _bfd_elf_create_got_section (abfd, info))
@@ -1985,7 +1985,7 @@ elf_arc_check_relocs (bfd *                        abfd,
            break;
        }
 
-      if (is_reloc_for_PLT (howto) == TRUE)
+      if (is_reloc_for_PLT (howto))
        {
          if (h == NULL)
            continue;
@@ -1994,8 +1994,8 @@ elf_arc_check_relocs (bfd *                        abfd,
        }
 
       /* Add info to the symbol got_entry_list.  */
-      if (is_reloc_for_GOT (howto) == TRUE
-         || is_reloc_for_TLS (howto) == TRUE)
+      if (is_reloc_for_GOT (howto)
+         || is_reloc_for_TLS (howto))
        {
          arc_fill_got_info_for_reloc (
                  arc_got_entry_type_for_reloc (howto),
index b21a146db31f4d317080782ac123c34a8655d4df..b3e09bd9792949d6178a77fa9248aa3813865c06 100644 (file)
@@ -329,11 +329,11 @@ bfin_bfd_reloc (bfd *abfd,
   /* Here the variable relocation holds the final address of the
      symbol we are relocating against, plus any addend.  */
 
-  if (howto->pc_relative == TRUE)
+  if (howto->pc_relative)
     {
       relocation -= input_section->output_section->vma + input_section->output_offset;
 
-      if (howto->pcrel_offset == TRUE)
+      if (howto->pcrel_offset)
         relocation -= reloc_entry->address;
     }
 
index 932d8ffff90e32e60cbb799edaa325eefa91af0b..6f587201590d094bad1fd721657b21da7007f5ce 100644 (file)
@@ -2353,7 +2353,7 @@ elf_m68k_partition_multi_got_1 (void **_entry, void *_arg)
   if (diff != NULL)
     elf_m68k_clear_got (diff);
 
-  return arg->error_p == FALSE ? 1 : 0;
+  return !arg->error_p;
 }
 
 /* Helper function to build symndx2h mapping.  */
index 17951753b3a42bcf908e13d6c40bd923d808af74..94fb0374396a2a59d6fac1b9c73a3de0e3ef5613 100644 (file)
@@ -3295,7 +3295,7 @@ nds32_elf_final_sda_base (bfd *output_bfd, struct bfd_link_info *info,
        }
     }
 
-  if (add_symbol == TRUE)
+  if (add_symbol)
     {
       if (h)
        {
@@ -12246,7 +12246,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec,
                                 irelend, isymbuf))
        goto error_return;
 
-      if (*again == FALSE)
+      if (!*again)
        {
          if (!nds32_fag_remove_unused_fpbase (abfd, sec, internal_relocs,
                                               irelend))
@@ -12256,7 +12256,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec,
 
   nds32_elf_pick_relax (FALSE, sec, again, table, link_info);
 
-  if (*again == FALSE)
+  if (!*again)
     {
       if (!nds32_relax_adjust_label (abfd, sec, internal_relocs, contents,
                                     &relax_blank_list, optimize, opt_size))
@@ -12273,7 +12273,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec,
       relax_blank_list = NULL;
     }
 
-  if (*again == FALSE)
+  if (!*again)
     {
       /* Closing the section, so we don't relax it anymore.  */
       bfd_vma sec_size_align;
index 63d0cbe5f56b4a7fcca05b56b424d8bf191081e5..d333203ec5d1f0685b8f4b3651943d505810e337 100644 (file)
@@ -3896,7 +3896,7 @@ tilepro_elf_finish_dynamic_sections (bfd *output_bfd,
 
       ret = tilepro_finish_dyn (output_bfd, info, dynobj, sdyn, splt);
 
-      if (ret != TRUE)
+      if (!ret)
        return ret;
 
       /* Fill in the first entry in the procedure linkage table.  */
index bc1042839f79b6e07229378c91471e72cc66d1a6..387c6fdd135030e70538d60e5a3904afbd7d8322 100644 (file)
@@ -8825,7 +8825,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
                else
                  {
                    /* Section size is only divisible by rela.  */
-                   if (use_rela_initialised && (use_rela == FALSE))
+                   if (use_rela_initialised && !use_rela)
                      {
                        _bfd_error_handler (_("%B: Unable to sort relocs - "
                                              "they are in more than one size"),
@@ -8843,7 +8843,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
            else if ((o->size % bed->s->sizeof_rel) == 0)
              {
                /* Section size is only divisible by rel.  */
-               if (use_rela_initialised && (use_rela == TRUE))
+               if (use_rela_initialised && use_rela)
                  {
                    _bfd_error_handler (_("%B: Unable to sort relocs - "
                                          "they are in more than one size"),
@@ -8882,7 +8882,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
                else
                  {
                    /* Section size is only divisible by rela.  */
-                   if (use_rela_initialised && (use_rela == FALSE))
+                   if (use_rela_initialised && !use_rela)
                      {
                        _bfd_error_handler (_("%B: Unable to sort relocs - "
                                              "they are in more than one size"),
@@ -8900,7 +8900,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
            else if ((o->size % bed->s->sizeof_rel) == 0)
              {
                /* Section size is only divisible by rel.  */
-               if (use_rela_initialised && (use_rela == TRUE))
+               if (use_rela_initialised && use_rela)
                  {
                    _bfd_error_handler (_("%B: Unable to sort relocs - "
                                          "they are in more than one size"),
@@ -12964,7 +12964,7 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info,
          else if (isec->gc_mark)
            some_kept = TRUE;
 
-         if (debug_frag_seen == FALSE
+         if (!debug_frag_seen
              && (isec->flags & SEC_DEBUGGING)
              && CONST_STRNEQ (isec->name, ".debug_line."))
            debug_frag_seen = TRUE;
index aaa774824494fb80b41468460cb90907515f9fcc..2ff2120ffb27eeadfa5b8ba352a2d45c864fe431 100644 (file)
@@ -1870,7 +1870,7 @@ elfNN_aarch64_bfd_reloc_from_type (unsigned int r_type)
   /* Indexed by R_TYPE, values are offsets in the howto_table.  */
   static unsigned int offsets[R_AARCH64_end];
 
-  if (initialized_p == FALSE)
+  if (!initialized_p)
     {
       unsigned int i;
 
@@ -5169,7 +5169,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
       /* When generating a shared object or relocatable executable, these
          relocations are copied into the output file to be resolved at
          run time.  */
-      if (((bfd_link_pic (info) == TRUE)
+      if ((bfd_link_pic (info)
           || globals->root.is_relocatable_executable)
          && (input_section->flags & SEC_ALLOC)
          && (h == NULL
index 5a0fae15110bd6484bc3246fb0888942ed7e3aa1..4e3cf552b1a9323c4eb26f962272898f664a03ba 100644 (file)
@@ -2489,7 +2489,7 @@ riscv_elf_finish_dynamic_sections (bfd *output_bfd,
 
       ret = riscv_finish_dyn (output_bfd, info, dynobj, sdyn);
 
-      if (ret != TRUE)
+      if (!ret)
        return ret;
 
       /* Fill in the head and tail entries in the procedure linkage table.  */
index 95c9a155b1a06566859b0552940bc1e301614e7e..ec88ab31a66865d9164a27a3b9e800a338ce8a86 100644 (file)
@@ -4293,7 +4293,7 @@ tilegx_elf_finish_dynamic_sections (bfd *output_bfd,
 
       ret = tilegx_finish_dyn (output_bfd, info, dynobj, sdyn, splt);
 
-      if (ret != TRUE)
+      if (!ret)
        return ret;
 
       /* Fill in the head and tail entries in the procedure linkage table.  */
index edfac158a9cdfbb1981987cddec93ae2582370b4..2c1973c2a42bdea0f1b33ac450332138ea70df56 100644 (file)
@@ -1898,7 +1898,7 @@ bfd_mach_o_write_symtab_content (bfd *abfd, bfd_mach_o_symtab_command *sym)
   if (bfd_seek (abfd, sym->stroff, SEEK_SET) != 0)
     goto err;
 
-  if (_bfd_stringtab_emit (abfd, strtab) != TRUE)
+  if (!_bfd_stringtab_emit (abfd, strtab))
     goto err;
 
   /* Pad string table.  */
index da6f0a8999fcfa5f1be490fc8662cb6f5dd01095..27a75b3ebdf7e5117f5fdab48283b240123b3459 100644 (file)
@@ -3831,7 +3831,7 @@ rsrc_merge_string_entries (rsrc_entry * a ATTRIBUTE_UNUSED,
     {
       if (a->parent != NULL
          && a->parent->entry != NULL
-         && a->parent->entry->is_name == FALSE)
+         && !a->parent->entry->is_name)
        _bfd_error_handler (_(".rsrc merge failure: duplicate string resource: %d"),
                            ((a->parent->entry->name_id.id - 1) << 4) + i);
       return FALSE;
@@ -3939,22 +3939,22 @@ rsrc_sort_entries (rsrc_dir_chain *  chain,
                     There should only ever be one non-zero lang manifest -
                     if there are more it is an error.  A non-zero lang
                     manifest takes precedence over a default manifest.  */
-                 if (entry->is_name == FALSE
+                 if (!entry->is_name
                      && entry->name_id.id == 1
                      && dir != NULL
                      && dir->entry != NULL
-                     && dir->entry->is_name == FALSE
+                     && !dir->entry->is_name
                      && dir->entry->name_id.id == 0x18)
                    {
                      if (next->value.directory->names.num_entries == 0
                          && next->value.directory->ids.num_entries == 1
-                         && next->value.directory->ids.first_entry->is_name == FALSE
+                         && !next->value.directory->ids.first_entry->is_name
                          && next->value.directory->ids.first_entry->name_id.id == 0)
                        /* Fall through so that NEXT is dropped.  */
                        ;
                      else if (entry->value.directory->names.num_entries == 0
                               && entry->value.directory->ids.num_entries == 1
-                              && entry->value.directory->ids.first_entry->is_name == FALSE
+                              && !entry->value.directory->ids.first_entry->is_name
                               && entry->value.directory->ids.first_entry->name_id.id == 0)
                        {
                          /* Swap ENTRY and NEXT.  Then fall through so that the old ENTRY is dropped.  */
@@ -3995,22 +3995,22 @@ rsrc_sort_entries (rsrc_dir_chain *  chain,
                     message - because there should never be duplicates.
                     The exception is Type 18/Name 1/Lang 0 which is the
                     defaul manifest - this can just be dropped.  */
-                 if (entry->is_name == FALSE
+                 if (!entry->is_name
                      && entry->name_id.id == 0
                      && dir != NULL
                      && dir->entry != NULL
-                     && dir->entry->is_name == FALSE
+                     && !dir->entry->is_name
                      && dir->entry->name_id.id == 1
                      && dir->entry->parent != NULL
                      && dir->entry->parent->entry != NULL
-                     && dir->entry->parent->entry->is_name == FALSE
+                     && !dir->entry->parent->entry->is_name
                      && dir->entry->parent->entry->name_id.id == 0x18 /* RT_MANIFEST */)
                    ;
                  else if (dir != NULL
                           && dir->entry != NULL
                           && dir->entry->parent != NULL
                           && dir->entry->parent->entry != NULL
-                          && dir->entry->parent->entry->is_name == FALSE
+                          && !dir->entry->parent->entry->is_name
                           && dir->entry->parent->entry->name_id.id == 0x6 /* RT_STRING */)
                    {
                      /* Strings need special handling.  */
index ef52120ad62346997f6e7234d0738281828e5b24..a321affbb933750a5f87bb99367aa0a0218bba0f 100644 (file)
@@ -677,7 +677,7 @@ _bfd_vms_slurp_eihs (bfd *abfd, unsigned int offset)
          return FALSE;
        }
 
-      if (_bfd_vms_slurp_object_records (abfd) != TRUE)
+      if (!_bfd_vms_slurp_object_records (abfd))
        return FALSE;
 
       abfd->flags |= HAS_SYMS;
@@ -2411,7 +2411,7 @@ _bfd_vms_slurp_object_records (bfd * abfd)
         default:
           err = FALSE;
        }
-      if (err != TRUE)
+      if (!err)
        {
          vms_debug2 ((2, "slurp type %d failed\n", type));
          return FALSE;
@@ -2551,14 +2551,14 @@ alpha_vms_object_p (bfd *abfd)
        goto error_ret;
       vms_debug2 ((2, "file type is image\n"));
 
-      if (_bfd_vms_slurp_eihd (abfd, &eisd_offset, &eihs_offset) != TRUE)
+      if (!_bfd_vms_slurp_eihd (abfd, &eisd_offset, &eihs_offset))
         goto err_wrong_format;
 
-      if (_bfd_vms_slurp_eisd (abfd, eisd_offset) != TRUE)
+      if (!_bfd_vms_slurp_eisd (abfd, eisd_offset))
         goto err_wrong_format;
 
       /* EIHS is optional.  */
-      if (eihs_offset != 0 && _bfd_vms_slurp_eihs (abfd, eihs_offset) != TRUE)
+      if (eihs_offset != 0 && !_bfd_vms_slurp_eihs (abfd, eihs_offset))
         goto err_wrong_format;
     }
   else
@@ -2578,10 +2578,10 @@ alpha_vms_object_p (bfd *abfd)
           vms_debug2 ((2, "file type is module\n"));
 
           type = bfd_getl16 (PRIV (recrd.rec));
-          if (type != EOBJ__C_EMH || _bfd_vms_slurp_ehdr (abfd) != TRUE)
+          if (type != EOBJ__C_EMH || !_bfd_vms_slurp_ehdr (abfd))
             goto err_wrong_format;
 
-          if (_bfd_vms_slurp_object_records (abfd) != TRUE)
+          if (!_bfd_vms_slurp_object_records (abfd))
             goto err_wrong_format;
         }
       else
@@ -3976,13 +3976,13 @@ alpha_vms_write_object_contents (bfd *abfd)
     {
       if (abfd->section_count > 0)                     /* we have sections */
         {
-          if (_bfd_vms_write_ehdr (abfd) != TRUE)
+          if (!_bfd_vms_write_ehdr (abfd))
             return FALSE;
-          if (_bfd_vms_write_egsd (abfd) != TRUE)
+          if (!_bfd_vms_write_egsd (abfd))
             return FALSE;
-          if (_bfd_vms_write_etir (abfd, EOBJ__C_ETIR) != TRUE)
+          if (!_bfd_vms_write_etir (abfd, EOBJ__C_ETIR))
             return FALSE;
-          if (_bfd_vms_write_eeom (abfd) != TRUE)
+          if (!_bfd_vms_write_eeom (abfd))
             return FALSE;
         }
     }
@@ -8162,9 +8162,9 @@ alpha_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
         h = NULL;
 
       h_root = (struct bfd_link_hash_entry *) h;
-      if (_bfd_generic_link_add_one_symbol
-          (info, abfd, sym.name, sym.flags, sym.section, sym.value,
-           NULL, FALSE, FALSE, &h_root) == FALSE)
+      if (!_bfd_generic_link_add_one_symbol (info, abfd, sym.name, sym.flags,
+                                            sym.section, sym.value, NULL,
+                                            FALSE, FALSE, &h_root))
         return FALSE;
       h = (struct alpha_vms_link_hash_entry *) h_root;
 
@@ -9077,9 +9077,9 @@ vms_close_and_cleanup (bfd * abfd)
     {
       /* Last step on VMS is to convert the file to variable record length
         format.  */
-      if (bfd_cache_close (abfd) != TRUE)
+      if (!bfd_cache_close (abfd))
        return FALSE;
-      if (_bfd_vms_convert_to_var_unix_filename (abfd->filename) != TRUE)
+      if (!_bfd_vms_convert_to_var_unix_filename (abfd->filename))
        return FALSE;
     }
 #endif
index a02da0c66810b453d2e4d552dfc5e65e3b82f408..7b1320de721b9812f162402159d231d4b5a757ed 100644 (file)
@@ -1662,7 +1662,7 @@ vms_write_index (bfd *abfd,
                       /* Write it to the disk (if there is one).  */
                       if (kbn_vbn != 0)
                         {
-                          if (vms_write_block (abfd, kbn_vbn, kbn_blk) != TRUE)
+                          if (!vms_write_block (abfd, kbn_vbn, kbn_blk))
                             return FALSE;
                         }
                       else
@@ -1780,7 +1780,7 @@ vms_write_index (bfd *abfd,
               if (abfd != NULL)
                 {
                   bfd_putl16 (blk[j].len + blk[j].lastlen, rblk[j]->used);
-                  if (vms_write_block (abfd, blk[j].vbn, rblk[j]) != TRUE)
+                  if (!vms_write_block (abfd, blk[j].vbn, rblk[j]))
                     return FALSE;
                 }
 
@@ -1873,7 +1873,7 @@ vms_write_index (bfd *abfd,
     {
       /* Write this block on the disk.  */
       bfd_putl16 (blk[j].len + blk[j].lastlen, rblk[j]->used);
-      if (vms_write_block (abfd, blk[j].vbn, rblk[j]) != TRUE)
+      if (!vms_write_block (abfd, blk[j].vbn, rblk[j]))
         return FALSE;
 
       free (rblk[j]);
@@ -1882,7 +1882,7 @@ vms_write_index (bfd *abfd,
   /* Write the last kbn (if any).  */
   if (kbn_vbn != 0)
     {
-      if (vms_write_block (abfd, kbn_vbn, kbn_blk) != TRUE)
+      if (!vms_write_block (abfd, kbn_vbn, kbn_blk))
         return FALSE;
       free (kbn_blk);
     }
@@ -2223,11 +2223,11 @@ _bfd_vms_lib_write_archive_contents (bfd *arch)
 
   /* Write the indexes.  */
   vbn = 2;
-  if (vms_write_index (arch, modules, nbr_modules, &vbn, &mod_idx_vbn,
-                       is_elfidx) != TRUE)
+  if (!vms_write_index (arch, modules, nbr_modules, &vbn, &mod_idx_vbn,
+                       is_elfidx))
     return FALSE;
-  if (vms_write_index (arch, symbols, nbr_symbols, &vbn, &sym_idx_vbn,
-                       is_elfidx) != TRUE)
+  if (!vms_write_index (arch, symbols, nbr_symbols, &vbn, &sym_idx_vbn,
+                       is_elfidx))
     return FALSE;
 
   /* Write libary header.  */
@@ -2298,7 +2298,7 @@ _bfd_vms_lib_write_archive_contents (bfd *arch)
     bfd_putl16 (sym_idx_vbn, idd->vbn);
     idd++;
 
-    if (vms_write_block (arch, 1, blk) != TRUE)
+    if (!vms_write_block (arch, 1, blk))
       return FALSE;
   }
 
index 675050bce70c1053e62729286345a33fa1671760..44467f12065ba3e90a61d1097c4133bd8db6b2b8 100644 (file)
@@ -1,3 +1,7 @@
+2017-05-18  Alan Modra  <amodra@gmail.com>
+
+       * strings.c: Don't compare boolean values against TRUE or FALSE.
+
 2017-05-15  Jeff Law  <law@redhat.com>
 
        * readelf.c (display_arc_attribute): Avoid implicit fallthru.
index e1511a8c022c157a6a649d199436d432ca4c9db3..13e261923b8876e480010b97eb37a7d46c2811b5 100644 (file)
@@ -80,7 +80,7 @@
       (   (c) >= 0 \
        && (c) <= 255 \
        && ((c) == '\t' || ISPRINT (c) || (encoding == 'S' && (c) > 127) \
-           || (include_all_whitespace == TRUE && ISSPACE (c))) \
+          || (include_all_whitespace && ISSPACE (c))) \
       )
 
 #ifndef errno
@@ -318,7 +318,7 @@ main (int argc, char **argv)
          else
            {
              files_given = TRUE;
-             exit_status |= strings_file (argv[optind]) == FALSE;
+             exit_status |= !strings_file (argv[optind]);
            }
        }
     }
index 9b0ea23f4755a0e42bde74d39993ebc793e1d853..8605e59d53f649cef685f667973c43d847fea7cb 100644 (file)
@@ -1,3 +1,10 @@
+2017-05-18  Alan Modra  <amodra@gmail.com>
+
+       * config/tc-aarch64.c: Don't compare booleans against TRUE or FALSE.
+       * config/tc-hppa.c: Likewise.
+       * config/tc-mips.c: Likewise.
+       * config/tc-score7.c: Likewise.
+
 2017-05-16  Alan Modra  <amodra@gmail.com>
 
        * write.c (GENERIC_FORCE_RELOCATION_LOCAL): Define.
index a9dbd548d235f6a2438d3529946f07f5b5c43c68..72b98fd10bf6e4d7f443bb499d8bba7500be7501 100644 (file)
@@ -992,7 +992,7 @@ parse_typed_reg (char **ccp, aarch64_reg_type type, aarch64_reg_type *rtype,
          return PARSE_FAIL;
        }
 
-      if (in_reg_list == TRUE)
+      if (in_reg_list)
        {
          first_error (_("index not allowed inside register list"));
          return PARSE_FAIL;
@@ -3001,7 +3001,7 @@ parse_shift (char **str, aarch64_opnd_info *operand, enum parse_shift_mode mode)
   switch (mode)
     {
     case SHIFTED_LOGIC_IMM:
-      if (aarch64_extend_operator_p (kind) == TRUE)
+      if (aarch64_extend_operator_p (kind))
        {
          set_syntax_error (_("extending shift is not permitted"));
          return FALSE;
@@ -3092,7 +3092,7 @@ parse_shift (char **str, aarch64_opnd_info *operand, enum parse_shift_mode mode)
     operand->shifter.amount = 1;
   else if (exp.X_op == O_absent)
     {
-      if (aarch64_extend_operator_p (kind) == FALSE || exp_has_prefix)
+      if (!aarch64_extend_operator_p (kind) || exp_has_prefix)
        {
          set_syntax_error (_("missing shift amount"));
          return FALSE;
@@ -4413,7 +4413,7 @@ find_best_match (const aarch64_inst *instr,
       const aarch64_opnd_qualifier_t *qualifiers = *qualifiers_list;
 
       /* Most opcodes has much fewer patterns in the list.  */
-      if (empty_qualifier_sequence_p (qualifiers) == TRUE)
+      if (empty_qualifier_sequence_p (qualifiers))
        {
          DEBUG_TRACE_IF (i == 0, "empty list of qualifier sequence");
          break;
@@ -4621,7 +4621,7 @@ output_operand_error_record (const operand_error_record *record, char *str)
            {
              /* Most opcodes has much fewer patterns in the list.
                 First NIL qualifier indicates the end in the list.   */
-             if (empty_qualifier_sequence_p (*qualifiers_list) == TRUE)
+             if (empty_qualifier_sequence_p (*qualifiers_list))
                break;
 
              if (i != qlf_idx)
index 1dbc0979f238c0df449340d3f8d37b6004591abe..724b48bfbce0d102f980f4f0a3bf3f809320404f 100644 (file)
@@ -5687,7 +5687,7 @@ pa_ip (char *str)
       /* If this instruction is specific to a particular architecture,
         then set a new architecture.  This automatic promotion crud is
         for compatibility with HP's old assemblers only.  */
-      if (match == TRUE
+      if (match
          && bfd_get_mach (stdoutput) < insn->arch
          && !bfd_set_arch_mach (stdoutput, bfd_arch_hppa, insn->arch))
        {
index 7e927b23fa36bddd7d2c42569ba7c61e7610cbcb..ecd3c8e6310d6943e593f5b8074c0422d74467ce 100644 (file)
@@ -6911,7 +6911,7 @@ can_swap_branch_p (struct mips_cl_insn *ip, expressionS *address_expr,
                   break;
                 }
             }
-          if (rv == FALSE)
+          if (!rv)
             {
               /* Insert nop after branch to fix short loop. */
               return FALSE;
index 758fac9b24a0ab917bb8e0b5ffc194633f15ab89..1c73110e8159aae35949b484d4cd94a46858a575 100644 (file)
@@ -6500,7 +6500,7 @@ s7_relax_frag (asection * sec ATTRIBUTE_UNUSED,
       else
         {
          /* Here, try best to do relax regardless fragp->fr_next->fr_type.  */
-          if (word_align_p == FALSE)
+          if (!word_align_p)
             {
               if (insn_size % 4 == 0)
                 {
index c5892d17f7769f3e2796ba4c7f1374e161de7b0c..2092fb0f9d722b37d3a5b5b6c8ac9ffff3febb88 100644 (file)
@@ -1,3 +1,10 @@
+2017-05-18  Alan Modra  <amodra@gmail.com>
+
+       * emultempl/elf32.em: Don't compare boolean values against TRUE or FALSE.
+       * emultempl/pe.em: Likewise.
+       * emultempl/pep.em: Likewise.
+       * emultempl/xtensaelf.em: Likewise.
+
 2017-05-18  Alan Modra  <amodra@gmail.com>
 
        PR ld/20882
index 3442c955bf92b0d07e2cb51ef71ad2b31840945c..0260b7ac44c211de2260fb2838dffe59a4ca0de0 100644 (file)
@@ -1538,7 +1538,7 @@ fragment <<EOF
     }
 
   if (link_info.eh_frame_hdr_type == COMPACT_EH_HDR)
-    if (bfd_elf_parse_eh_frame_entries (NULL, &link_info) == FALSE)
+    if (!bfd_elf_parse_eh_frame_entries (NULL, &link_info))
       einfo (_("%P%F: Failed to parse EH frame entries.\n"));
 }
 
index e835404479fb5c19b04f63bfdaf4c57afb6d9bba..16d28e234b3f92c1bc617ed1e9181363df056e94 100644 (file)
@@ -379,7 +379,7 @@ typedef struct
    underscore.  */
 #define GET_INIT_SYMBOL_NAME(IDX) \
   (init[(IDX)].symbol \
-  + ((init[(IDX)].is_c_symbol == FALSE || (is_underscoring () != 0)) ? 0 : 1))
+   + ((!init[(IDX)].is_c_symbol || is_underscoring () != 0) ? 0 : 1))
 
 /* Decorates the C visible symbol by underscore, if target requires.  */
 #define U(CSTR) \
index 59812ce3d8f2ca87cfce1a6cf19ce7e2ef269922..420ffa849ec928c617c66a79670482e89e0b07b3 100644 (file)
@@ -350,7 +350,7 @@ typedef struct
 
 #define GET_INIT_SYMBOL_NAME(IDX) \
   (init[(IDX)].symbol \
-  + ((init[(IDX)].is_c_symbol == FALSE || (is_underscoring () == 1)) ? 0 : 1))
+   + ((!init[(IDX)].is_c_symbol || is_underscoring () == 1) ? 0 : 1))
 
 /* Decorates the C visible symbol by underscore, if target requires.  */
 #define U(CSTR) \
index 080b66d50da848825d314b95a68c61134ac7b5ac..1447d526a25bf48767a2fe43780a773eb910e59b 100644 (file)
@@ -1432,7 +1432,7 @@ xtensa_wild_group_interleave_callback (lang_statement_union_type *statement)
          struct wildcard_list *l;
          for (l = w->section_list; l != NULL; l = l->next)
            {
-             if (l->spec.sorted == TRUE)
+             if (l->spec.sorted != none)
                {
                  no_reorder = TRUE;
                  break;
index 7c819d35ada15ca72528d973c30a6f24f383d6be..fba29e09d569d295003bb82db611b749cba71259 100644 (file)
@@ -1,3 +1,10 @@
+2017-05-18  Alan Modra  <amodra@gmail.com>
+
+       * aarch64-asm.c: Don't compare boolean values against TRUE or FALSE.
+       * aarch64-dis.c: Likewise.
+       * aarch64-gen.c: Likewise.
+       * aarch64-opc.c: Likewise.
+
 2017-05-15  Maciej W. Rozycki  <macro@imgtec.com>
            Matthew Fortune  <matthew.fortune@imgtec.com>
 
index 516bdabbacb56b2c590fa3cd5a501c6b548e8d48..6d2c75a068e94b163618e412b47c546326cc6af5 100644 (file)
@@ -498,9 +498,8 @@ aarch64_ins_limm_1 (const aarch64_operand *self,
 
   if (invert_p)
     imm = ~imm;
-  if (aarch64_logical_immediate_p (imm, esize, &value) == FALSE)
-    /* The constraint check should have guaranteed this wouldn't happen.  */
-    assert (0);
+  /* The constraint check should have guaranteed this wouldn't happen.  */
+  assert (aarch64_logical_immediate_p (imm, esize, &value));
 
   insert_fields (code, value, 0, 3, self->fields[2], self->fields[1],
                 self->fields[0]);
index b528af61e901fea9402aef0be5210f18e28f3177..e5fe61f51d13e06342947437ec80731f692e2628 100644 (file)
@@ -2339,7 +2339,7 @@ convert_movewide_to_mov (aarch64_inst *inst)
       int is32 = inst->operands[0].qualifier == AARCH64_OPND_QLF_W;
       value = ~value;
       /* A MOVN has an immediate that could be encoded by MOVZ.  */
-      if (aarch64_wide_constant_p (value, is32, NULL) == TRUE)
+      if (aarch64_wide_constant_p (value, is32, NULL))
        return 0;
     }
   inst->operands[1].imm.value = value;
@@ -2372,8 +2372,8 @@ convert_movebitmask_to_mov (aarch64_inst *inst)
   /* ORR has an immediate that could be generated by a MOVZ or MOVN
      instruction.  */
   if (inst->operands[0].reg.regno != 0x1f
-      && (aarch64_wide_constant_p (value, is32, NULL) == TRUE
-         || aarch64_wide_constant_p (~value, is32, NULL) == TRUE))
+      && (aarch64_wide_constant_p (value, is32, NULL)
+         || aarch64_wide_constant_p (~value, is32, NULL)))
     return 0;
 
   inst->operands[2].type = AARCH64_OPND_NIL;
@@ -2494,7 +2494,7 @@ determine_disassembling_preference (struct aarch64_inst *inst)
   opcode = inst->opcode;
 
   /* This opcode does not have an alias, so use itself.  */
-  if (opcode_has_alias (opcode) == FALSE)
+  if (!opcode_has_alias (opcode))
     return;
 
   alias = aarch64_find_alias_opcode (opcode);
index 0ba22427d5ad9c8afa02bb2218f389b8bd885df3..d2685dc3d1dea71afaec13adc0ae95d79295b27c 100644 (file)
@@ -143,9 +143,9 @@ read_table (const struct aarch64_opcode* table)
       /* F_PSEUDO needs to be used together with F_ALIAS to indicate an alias
         opcode is a programmer friendly pseudo instruction available only in
         the assembly code (thus will not show up in the disassembly).  */
-      assert (pseudo_opcode_p (ent) == FALSE || alias_opcode_p (ent) == TRUE);
+      assert (!pseudo_opcode_p (ent) || alias_opcode_p (ent));
       /* Skip alias (inc. pseudo) opcode.  */
-      if (alias_opcode_p (ent) == TRUE)
+      if (alias_opcode_p (ent))
        {
          index++;
          continue;
@@ -704,7 +704,7 @@ find_alias_opcode (const aarch64_opcode *opcode)
       /* The mask of an alias opcode must be equal to or a super-set (i.e.
         more constrained) of that of the aliased opcode; so is the base
         opcode value.  */
-      if (alias_opcode_p (ent) == TRUE
+      if (alias_opcode_p (ent)
          && (ent->mask & opcode->mask) == opcode->mask
          && (opcode->mask & ent->opcode) == (opcode->mask & opcode->opcode))
        {
index a52ea70c0093f7daaecfd58e3f0e81a3953abf5f..a47a754fff2bcf9389e1241b0213ac545e17a400 100644 (file)
@@ -1207,7 +1207,7 @@ aarch64_logical_immediate_p (uint64_t value, int esize, aarch64_insn *encoding)
   DEBUG_TRACE ("enter with 0x%" PRIx64 "(%" PRIi64 "), esize: %d", value,
               value, esize);
 
-  if (initialized == FALSE)
+  if (!initialized)
     {
       build_immediate_table ();
       initialized = TRUE;
@@ -2113,7 +2113,7 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx,
            uint64_t uimm = opnd->imm.value;
            if (opcode->op == OP_BIC)
              uimm = ~uimm;
-           if (aarch64_logical_immediate_p (uimm, esize, NULL) == FALSE)
+           if (!aarch64_logical_immediate_p (uimm, esize, NULL))
              {
                set_other_error (mismatch_detail, idx,
                                 _("immediate out of range"));
@@ -2521,7 +2521,7 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx,
       switch (type)
        {
        case AARCH64_OPND_Rm_EXT:
-         if (aarch64_extend_operator_p (opnd->shifter.kind) == FALSE
+         if (!aarch64_extend_operator_p (opnd->shifter.kind)
              && opnd->shifter.kind != AARCH64_MOD_LSL)
            {
              set_other_error (mismatch_detail, idx,
@@ -2573,7 +2573,7 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx,
        case AARCH64_OPND_Rm_SFT:
          /* ROR is not available to the shifted register operand in
             arithmetic instructions.  */
-         if (aarch64_shift_operator_p (opnd->shifter.kind) == FALSE)
+         if (!aarch64_shift_operator_p (opnd->shifter.kind))
            {
              set_other_error (mismatch_detail, idx,
                               _("shift operator expected"));