In pp_iter, handle end of range at IV_MAX without undefined behaviour.
authorNicholas Clark <nick@ccl4.org>
Mon, 16 Apr 2012 05:51:49 +0000 (07:51 +0200)
committerNicholas Clark <nick@ccl4.org>
Tue, 19 Jun 2012 08:19:28 +0000 (10:19 +0200)
commitcdc1aa425ff891f079f6e8b0787d0d9aa145bd47
tree05dbab134a6a6984aa7606cf3753e4368e9462d3
parent66d2c7cb575fb77aa0403c44521daff3e400f738
In pp_iter, handle end of range at IV_MAX without undefined behaviour.

The previous code assumed that incrementing a signed integer value wraps.
We're lucky that it has (so far), as it's undefined behaviour in C.
So refactor to code which doesn't assume anything.
pp_hot.c