Re: [RFC] Fix compiler warnings in osabi.c

Eli Zaretskii
2006-01-11T04:22:13Z

> Date: Tue, 10 Jan 2006 23:22:23 +0100 (CET)
> From: Mark Kettenis <mark.kettenis@xs4all.nl>
>
> - if (strcmp (&elf_elfheader (abfd)->e_ident[8], "FreeBSD") == 0)
> + if (memcmp (&elf_elfheader (abfd)->e_ident[8], "FreeBSD", 8) == 0)

I'm allergic to magic constants such as 8. Can we please make that
use sizeof("FreeBSD")? To avoid having two instances of "FreeBSD" in
the code, you could use a `const char []' variable with "FreeBSD" as
its value.

WDYT?