[BusyBox] udhcp patches/ endianess

Rainer Weikusat rainer.weikusat at sncag.com
Wed Feb 2 21:29:32 UTC 2005


Eric Lammerts <busybox at lists.lammerts.org> writes:
> On Wed, 2 Feb 2005, Rainer Weikusat wrote:

[...]

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

I do not work for Sun Microsystems :->.

>> > 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?

Given that this is the actual translation (the 'code'):

288:   e5d03000        ldrb    r3, [r0]
28c:   e08cc003        add     ip, ip, r3

or

        movzbl  (%ebx), %eax
        addl    %eax, %ecx

if you prefer x86, there is no 'dead code'. If I had to answer the
question if I would prefer a generic interface to express a specific
operation, with the added constraint that the interface will be free,
insofar the actual code is concerned, the answer would be
'yes'. Additionally, I haven't added anything to anything else, at
least not in a way that could possibly affect you.



More information about the busybox mailing list