svn commit: r226151 - head/usr.bin/kdump
Dag-Erling Smørgrav
des at des.no
Tue Oct 11 07:45:31 UTC 2011
Jaakko Heinonen <jh at FreeBSD.org> writes:
> Dag-Erling Smorgrav <des at FreeBSD.org> writes:
> > +#define print_number(i,n,c) \
> > + do { \
> > + if (decimal) \
> > + printf("%c%jd", c, (intmax_t)*i); \
> > + else \
> > + printf("%c%#jx", c, (intmax_t)*i); \
> > + i++; \
> > + n--; \
> > + c = ','; \
> > + } while (0)
> Are you sure that this change doesn't cause a regression on platforms
> where sizeof(long) != sizeof(intmax_t)?
>
> For example, previously, on i386 print_number() printed "0xffffffff" for
> -1 while after your change it will print "0xffffffffffffffff" (with %#jx).
You are right, the cast for the hex case should be to uintmax_t. I
think I got all the other instances right...
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the svn-src-all
mailing list