svn commit: r226151 - head/usr.bin/kdump

Jaakko Heinonen jh at FreeBSD.org
Tue Oct 11 14:54:45 UTC 2011


On 2011-10-11, Dag-Erling Smørgrav wrote:
> @@ -113,6 +114,8 @@
>  #define print_number(i,n,c) do {				\
>  	if (decimal)						\
>  		printf("%c%jd", c, (intmax_t)*i);		\
> +	else if (sizeof(*i) == sizeof(long))			\
> +		printf("%c%#lx", c, (unsigned long)*i);		\
>  	else							\
>  		printf("%c%#jx", c, (uintmax_t)*i);		\
>  	i++;							\

This assumes that sizeof(*i) is always sizeof(long) or
sizeof(uintmax_t). I prefer the fix bde suggested in another mail if
it's possible (I don't know if *i is always type of register_t).

-- 
Jaakko


More information about the svn-src-head mailing list