* osabi.c (generic_elf_osabi_sniffer): Use memcmp instead of
authorMark Kettenis <kettenis@gnu.org>
Sun, 15 Jan 2006 20:21:32 +0000 (20:21 +0000)
committerMark Kettenis <kettenis@gnu.org>
Sun, 15 Jan 2006 20:21:32 +0000 (20:21 +0000)
strcmp to compare string to a byte buffer.

gdb/ChangeLog
gdb/osabi.c

index 79f1df7b85af1cebc32c532e36e6797cf2b20da3..cd0d085d8663daf9308545afa716e39ba79dce8d 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-15  Mark Kettenis  <kettenis@gnu.org>
+
+       * osabi.c (generic_elf_osabi_sniffer): Use memcmp instead of
+       strcmp to compare string to a byte buffer.
+
 2006-01-15  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * printcmd.c (output_command): Always initialize fmt.size.
index d1f510287b5f414f4bdc5fbfbae574999ff08cb5..5d3962ae7522b71dee8127aa46e0320c51a02ba5 100644 (file)
@@ -546,7 +546,8 @@ generic_elf_osabi_sniffer (bfd *abfd)
       /* The FreeBSD folks have been naughty; they stored the string
          "FreeBSD" in the padding of the e_ident field of the ELF
          header to "brand" their ELF binaries in FreeBSD 3.x.  */
-      if (strcmp (&elf_elfheader (abfd)->e_ident[8], "FreeBSD") == 0)
+      if (memcmp (&elf_elfheader (abfd)->e_ident[8],
+                 "FreeBSD", sizeof ("FreeBSD") == 0)
        osabi = GDB_OSABI_FREEBSD_ELF;
     }
 
This page took 0.025208 seconds and 4 git commands to generate.