Hi Mike On Sat, Oct 22, 2011 at 10:29 PM, Mike Frysinger <vap...@gentoo.org> wrote: > On Sat, Oct 22, 2011 at 00:51, Simon Glass <s...@chromium.org> wrote: >> +int setenv_ulong(const char *varname, ulong value) >> +{ >> + char *str = simple_itoa(value); >> + >> + return setenv(varname, str); >> +} > > could be a one liner, but works either way
OK, was trying to separate that out deliberately. > >> +int setenv_addr(const char *varname, const void *addr) >> +{ >> + char str[17]; > > char str[sizeof(addr) * 2 + 1]; Yes of course! > >> + sprintf(str, "%x", (uintptr_t)addr); > > i wonder if we should use %p and drop the cast > -mike > 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. I will tidy these up for v3. Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot