Use startswith more for strncmp function calls.
[deliverable/binutils-gdb.git] / bfd / elf64-ppc.c
index bc8dc4df1a5a3c9e5a43af14e054d5bbc2ddf4b3..c306954dacb7240a97bd20cb0bb6aacd07e1e8d8 100644 (file)
@@ -2042,8 +2042,8 @@ ppc64_elf_section_flags (const Elf_Internal_Shdr *hdr)
 {
   const char *name = hdr->bfd_section->name;
 
-  if (strncmp (name, ".sbss", 5) == 0
-      || strncmp (name, ".sdata", 6) == 0)
+  if (startswith (name, ".sbss")
+      || startswith (name, ".sdata"))
     hdr->bfd_section->flags |= SEC_SMALL_DATA;
 
   return true;
@@ -15873,7 +15873,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
                  if (*name == '.')
                    ++name;
 
-                 if (strncmp (name, "__libc_start_main", 17) == 0
+                 if (startswith (name, "__libc_start_main")
                      && (name[17] == 0 || name[17] == '@'))
                    {
                      /* Allow crt1 branch to go via a toc adjusting
This page took 0.027615 seconds and 4 git commands to generate.