Subject: Re: CVS commit: src/sys/dev/ic
To: None <email@example.com>
From: Christos Zoulas <firstname.lastname@example.org>
Date: 09/03/2006 19:14:32
In article <060904041043.M0209371@mirage.ceres.dti.ne.jp>,
Izumi Tsutsui <email@example.com> wrote:
>> | > Modified Files:
>> | > src/sys/dev/ic: mb89352.c
>> | >
>> | > Log Message:
>> | > comment out impossible code
>> | Isn't it better to make sc_dleft signed?
>> | (maybe this code should be wrapped by #ifdef DIAGNOSTIC anyway)
>> I think that keeping things unsigned makes the code simpler. Having
>> the checks always in the kernel prevents buffer overflows and crashes.
>But you #if 0'ed out a check ("data xfered more than requested bytes")
>which didn't work as intended because sc_dleft was unsigned.
I suspect that sc_dleft was initially signed, and then someone changed
it to unsigned without removing the test. I left the code commented out
just to make it clear that the test is not needed.