Re: [PATCH] sungem: limit reaches -1, but 0 tested

From: David Miller
Date: Sun Feb 01 2009 - 04:59:47 EST


From: Roel Kluin <roel.kluin@xxxxxxxxx>
Date: Sat, 31 Jan 2009 13:42:36 +0100

> With a postfix decrement these reach -1 rather than 0,
> but after the loop it is tested to have become 0.
>
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>

Just like the case just pointed out in your 'net' version
of this patch, it is being tested "<= 0" so this fix
is not necessary at all.

Please carefully review all of your changes of this kind
to make sure the test is strictly equality to zero rather
than <= 0.

I'm dropping all of these postfix decrement patches.
--
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/