[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] bug report
From: |
Jeff Barber |
Subject: |
Re: [lwip-users] bug report |
Date: |
Fri, 5 Mar 2010 12:50:15 -0500 |
On Fri, Mar 5, 2010 at 11:44 AM, Kieran Mansley <address@hidden> wrote:
> I think his point is that we're assuming that %x exists on his platform
> by hardcoding %02x in the code, whereas on his platform he needs to use
> something other than %x to get a hex output.
I suppose I could buy that. It would seem that the particular line
being cited would in that case be only the tip of the iceberg. There
are boatloads of %d, %u, %p, and other %x specifications sprinkled
liberally throughout the lwip code.
> The shorter-than-32-bit modifiers are needed because we only want to
> print out 2 characters for each byte of the MAC address. If we just
> used a standard %x or it got promoted as such you'd have very hard to
> read MAC addresses being output.
Each u8_t can only hold one byte and the integer promotion rules of C
guarantee that the "unsigned int" to which it is promoted represents
the same value (<= 0xff). How can it require more than two
characters?
Jeff
- [lwip-users] bug report, Martin Velek, 2010/03/05
- Re: [lwip-users] bug report, Jeff Barber, 2010/03/05
- Re: [lwip-users] bug report, Kieran Mansley, 2010/03/05
- RE: [lwip-users] bug report, Bill Auerbach, 2010/03/05
- Re: [lwip-users] bug report, Martin Velek, 2010/03/05
- Re: [lwip-users] bug report, address@hidden, 2010/03/07
- Re: [lwip-users] bug report, robin, 2010/03/07
- Re: [lwip-users] bug report, Martin Velek, 2010/03/07
- Re: [lwip-users] bug report, address@hidden, 2010/03/07
- Re: [lwip-users] bug report, Kieran Mansley, 2010/03/08
- Re: [lwip-users] bug report,
Jeff Barber <=