[PATCH] getenv.c: Avoid check for unknown endianness.

Carlos O'Donell carlos@systemhalted.org
Tue Feb 5 01:21:00 GMT 2013


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.



More information about the Libc-alpha mailing list