a code reduction function addition to cam_xpt
Ade Lovett
ade at freebsd.org
Mon Dec 4 20:42:55 PST 2006
On Dec 04, 2006, at 20:27 , mjacob at freebsd.org wrote:
>> On Dec 04, 2006, at 19:27 , mjacob at freebsd.org wrote:
>>> IOCCC?
>>
>> http://www.ioccc.org/
>>
>> Consider this another vote for "function" ;)
>
> Bruce is usually less indirect. What gives?
Multi-line #define's are 'orrible (IMO) -- of course, our tree is
littered with them, but it's highly preferable to have a function
over a define, particularly when it comes to reading the code n
months later, trying to track something down. In this particular
case, the minimal overhead of calling a function rather than having
it inline (via #define) is vastly outweighed by code-readability, and
reduction in kernel size.
-aDe
More information about the freebsd-scsi
mailing list