[binutils-gdb] gas style and readability nit

Alan Modra amodra@sourceware.org
Sun Jan 4 07:29:14 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a53a51ed1d8f13125af7e4c2660482b5901a2732

commit a53a51ed1d8f13125af7e4c2660482b5901a2732
Author: Alan Modra <amodra@gmail.com>
Date:   Sat Jan 3 13:42:58 2026 +1030

    gas style and readability nit
    
            * config/obj-elf.c (obj_elf_section): Introduce a variable
            rather than unreadable line wrapping.

Diff:
---
 gas/config/obj-elf.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index 9593ce26268..689d5cee45e 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -1275,14 +1275,12 @@ obj_elf_section (int push)
 	    }
 
 	  const struct elf_backend_data *bed = get_elf_backend_data (stdoutput);
+	  bool maybe_gnu = (bed->elf_osabi == ELFOSABI_NONE
+			    || bed->elf_osabi == ELFOSABI_GNU
+			    || bed->elf_osabi == ELFOSABI_FREEBSD);
 	  attr = obj_elf_parse_section_letters (beg, strlen (beg), push,
 						&is_clone, &inherit,
-						bed->elf_osabi == ELFOSABI_NONE
-						|| (bed->elf_osabi
-						    == ELFOSABI_GNU)
-						|| (bed->elf_osabi
-						    == ELFOSABI_FREEBSD)
-						? &gnu_attr : NULL,
+						maybe_gnu ? &gnu_attr : NULL,
 						&has_entsize);
 
 	  if (inherit > 0)


More information about the Binutils-cvs mailing list