On Tue, May 26, 2015 at 4:06 PM, Dan Carpenter <dan.carpen...@oracle.com> wrote: > You sure do like wrapping to a high value and testing the result for > wrapping instead of validating before doing the subtraction...
I do indeed. It seems like asking "did it overflow?" is more straight-forward and easier to read than trying to come up with the necessary conditions to check for "will it overflow?". Personal preference, I guess. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/