Avoid signed/unsigned comparison.