The previous commit did not fix the issue since it did not prevent sign

extension.  Cast to u_register_t first, then to uintmax_t.

Submitted by:	bde@
This commit is contained in:
Dag-Erling Smørgrav 2011-10-11 15:04:58 +00:00
parent 796fa5e465
commit 661522f5f3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226262

View File

@ -110,14 +110,14 @@ struct ktr_header ktr_header;
#define TIME_FORMAT "%b %e %T %Y"
#define eqs(s1, s2) (strcmp((s1), (s2)) == 0)
#define print_number(i,n,c) do { \
if (decimal) \
printf("%c%jd", c, (intmax_t)*i); \
else \
printf("%c%#jx", c, (uintmax_t)*i); \
i++; \
n--; \
c = ','; \
#define print_number(i,n,c) do { \
if (decimal) \
printf("%c%jd", c, (intmax_t)*i); \
else \
printf("%c%#jx", c, (uintmax_t)(u_register_t)*i); \
i++; \
n--; \
c = ','; \
} while (0)
#if defined(__amd64__) || defined(__i386__)