Re: [PATCH] parisc: test off by one in sgl_frem() and dbl_frem()

From: John David Anglin
Date: Sun Dec 27 2009 - 10:18:15 EST


> With `while (stepcount-- > 0)' stepcount reaches -1 after the loop.
>
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
> ---
> arch/parisc/math-emu/dfrem.c | 2 +-
> arch/parisc/math-emu/sfrem.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> Unless I am missing something?

Are you sure the correct fix isn't to move the decrement of stepcount
into the loop?

Dave
--
J. David Anglin dave.anglin@xxxxxxxxxxxxxx
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
--
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/