Hello.
On 17-11-2010 22:40, Matthew Dharm wrote:
+ length = 0;
+ fp = urb->iso_frame_desc;
+ while (ndesc-- != 0) {
+ if (fp->actual_length != 0) {
+ if (fp->offset + fp->actual_length > length)
+ length = fp->offset + fp->actual_length;
+ }
{} are not needed here, and thwo *if* statements can be collapsed into one.
They are semantically different and thus they were left uncollaplsed.
The upper one selects the descriptor and the lower own is an
open-coded min.
Did Pete mean max()?
Also, any collapsing would lead to hideously ugly
continuation lines.
What about doing the internal if() with a MIN() instead? It looks
equivalent to
length = MIN(length, fp->offset + fp->actual_length);
I don't know but the *if* looks like max() rather than min()...
Matt
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html