[BusyBox] udhcp patches/ endianess

Eric Lammerts busybox at lists.lammerts.org
Wed Feb 2 20:31:17 UTC 2005


On Wed, 2 Feb 2005, Rainer Weikusat wrote:
> Eric Lammerts <busybox at lists.lammerts.org> writes:
> > But the added config option is still totally unnecessary. The
> > necessary define already exists (__BYTE_ORDER).
>
> It exists in some non-standard glibc-header. Admittedly, the
> udhcp-code is not portable to non-Linux systems, anyway (OTOH, the
> timeout stuff is broken either way, so it probably doesn't make much
> of a difference) but this is (for me) reason enough to avoid it.

It's already in use in other places in busybox....

Why not leave the original there, or do
 sum += ntohs((uint16_t)*(uint8_t *)source << 8) ?

> > And why is pad_octet_left() there?? And why does pad_octet_right()
> > take a 'pad' argument when it's always zero anyway?
>
> Why not?

Uhhuh, you think it's nice to add dead code to a project?

Eric



More information about the busybox mailing list