Re: [PATCH 05/10] perf hists: Fixup addr snprintf width on 32 bit arches

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Joe Perches
Date: Friday, August 6, 2010 - 8:35 am

On Fri, 2010-08-06 at 11:29 -0300, Arnaldo Carvalho de Melo wrote:

Dunno, you made an output that looked like a pointer address,

64 bit:

"0x0123456789abcdef" now is " 123456789abcdef"

32 bit:

"0x0000000001234567" now is " 1234567"

snprintf(loc, size, "%#0*lx", BITS_PER_LONG / 4 + 2, (long))
might be better.

snprintf(loc, size, "%p", (void)long)
might be best.





--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 05/10] perf hists: Fixup addr snprintf width on 32 ..., Arnaldo Carvalho de Melo, (Thu Aug 5, 6:46 pm)
Re: [PATCH 05/10] perf hists: Fixup addr snprintf width on ..., Arnaldo Carvalho de Melo, (Fri Aug 6, 7:29 am)
Re: [PATCH 05/10] perf hists: Fixup addr snprintf width on ..., Joe Perches, (Fri Aug 6, 8:35 am)