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

From: David Miller
Date: Tue Feb 03 2009 - 02:20:22 EST


From: Roel Kluin <roel.kluin@xxxxxxxxx>
Date: Sun, 01 Feb 2009 18:15:27 +0100

> while (limit--)
> if (test())
> break;
>
> if (limit <= 0)
> goto test_failed;
>
> In the last iteration, limit is decremented after the test to 0.
> If just thereafter test() succeeds and a break occurs, the goto
> still occurs because limit is 0.
>
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>

Also applied, thanks.
--
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/