Avoid unsigned int + int comparisons.