Otherwise, the check is just undefined behaviour. gcc even takes out
this check because len can never be zero if len does not wrap around.
Found with -Wstrict-overflow=2
This switch warns about missing prototypes. It does not warn if
functions are declared static. So this switch encourages the usage of
static whenever possible. This enables the compiler to perform inlining.