Date: Sun, 6 Feb 2005 21:12:23 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/dev/ray if_ray.c Message-ID: <200502062112.j16LCNAA049446@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
imp 2005-02-06 21:12:23 UTC
FreeBSD src repository
Modified files:
sys/dev/ray if_ray.c
Log:
ccs is a size_t. RAY_CCS_INDEX takes ccs and does math on it,
resulting in a size_t due to C's rules of arithmetic. Rather than
bogusly cast the result to a uint8_t, fix the printf format specifier
to have a 'z' modifier which tells the compiler that the sizes really
do match.
It turns out that change 1.75 was incorrect to assume that this
'really' was a 8bit quantity. It isn't. Although the hardware
appears to limit things to < 256, it would be a bug that should be
caught by debug printf it it were. Casting it to uint8_t would have
lost this useful information.
Aslo add 'z' to a nearby debug statement that's never compiled in.
Revision Changes Path
1.76 +2 -2 src/sys/dev/ray/if_ray.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502062112.j16LCNAA049446>
