This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] getenv.c: Avoid check for unknown endianness.
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 4 Feb 2013 20:21:03 -0500
- Subject: Re: [PATCH] getenv.c: Avoid check for unknown endianness.
- References: <510AA149.3090801@redhat.com>
On Thu, Jan 31, 2013 at 11:52 AM, Carlos O'Donell <carlos@redhat.com> wrote:
> This is a small code cleanup.
>
> We only ever support big or little endian, and we should not
> check for a weird 3rd byte order. If such an error check were to
> happen it would happen in a central location or at configure
> time.
>
> The following patch removes check for the big endian case, and
> makes it assume that !__LITTLE_ENDIAN == __BIG_ENDIAN.
>
> No regressions on x86_64.
>
> OK?
>
> 2012-01-31 Carlos O'Donell <carlos@redhat.com>
>
> * stdlib/getenv.c (getenv): Assume __BIG_ENDIAN in the
> else clause and remove check for non-standard endianness.
Checked in.
c.