Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Oct 2011 17:54:38 +0300
From:      Jaakko Heinonen <jh@FreeBSD.org>
To:        Dag-Erling =?utf-8?B?U23DuHJncmF2?= <des@des.no>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r226151 - head/usr.bin/kdump
Message-ID:  <20111011145438.GB69508@jh>
In-Reply-To: <868vorkg1q.fsf@ds4.des.no>
References:  <201110081221.p98CLpWq062285@svn.freebsd.org> <20111010145642.GA2057@a91-153-123-205.elisa-laajakaista.fi> <86hb3gj7ja.fsf@ds4.des.no> <20111011090049.GA69508@jh> <868vorkg1q.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111011145438.GB69508>