[U-Boot] [PATCH 2/8] Add setenv_uint() and setenv_addr()

Mike Frysinger vapier at gentoo.org
Tue Oct 25 23:39:31 CEST 2011


On Tue, Oct 25, 2011 at 17:35, Simon Glass wrote:
> On Sat, Oct 22, 2011 at 10:29 PM, Mike Frysinger wrote:
>> On Sat, Oct 22, 2011 at 00:51, Simon Glass wrote:
>>> +       sprintf(str, "%x", (uintptr_t)addr);
>>
>> i wonder if we should use %p and drop the cast
>
> Is %p supposed to print a 0x before it or not? I saw some discussion
> about this. I vote for %p no, and %#p yes.

%p does not currently output a leading 0x.  it should (imo), and i'll
prob send a patch to fix that.

but %x doesn't output a leading 0x either :).
-mike


More information about the U-Boot mailing list