]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Replacwe string length constant with "sizeof()-1" in previous delta to target-reloc.h.
authorNick Clifton <nickc@redhat.com>
Mon, 6 Jul 2020 12:56:34 +0000 (13:56 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 6 Jul 2020 12:56:34 +0000 (13:56 +0100)
gold/target-reloc.h

index d1d0e135894786f26d5041f4a5772554fc9b11cd..a8c8e8405b29e384b985d5c1970d23e6aa449684 100644 (file)
@@ -136,7 +136,8 @@ class Default_comdat_behavior
     if (Layout::is_debug_info_section(name))
       return CB_PRETEND;
     if (strcmp(name, ".eh_frame") == 0
-       || strncmp(name, ".gnu.build.attributes", 21) == 0
+#define ATTR_SECTION_PREFIX ".gnu.build.attributes"
+       || strncmp(name, ATTR_SECTION_PREFIX, sizeof (ATTR_SECTION_PREFIX) - 1) == 0
        || strcmp(name, ".gcc_except_table") == 0)
       return CB_IGNORE;
     return CB_ERROR;