Re: [PATCH v3 1/4] ozwpan: Use proper check to prevent heap overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 29, 2015 at 2:36 PM, Frans Klaver <fransklaver@xxxxxxxxx> wrote:
>
> I would say that it is because part of the expression has been placed
> inside parentheses:
>
>     a - b + 1 == a - (b - 1)
>
> Guess it makes the decision logic slightly more readable.

Yes, exactly this. It's so that the bounding check conditional prior
looks identical to the actual subtraction, making it much easier to
read and verify.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux