Re: [Patch] Fix dead code in cdrom/gscd.c

From: Daniel K.
Date: Wed Mar 08 2006 - 06:35:38 EST


Eric Sesterhenn wrote:
hi,

this fixes Coverity Bugs #21 and #22. In both cases the
do { ... } while (result != 6 || result == 0x0E) just

This is completely wrong, and should be fixed too.

Either

do { ... } while (result != 6)

is correct, or this is the result of a thinko, and it should be

do { ... } while (result != 6 && result != 0x0E)

in which case your patch is incorrect.

finishes for result == 6, so the if(result != 6) doesnt
make much sense.

Unless its presence is an indication of faulty logic in the while clause


Daniel K.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/