I like how ftruncate() takes a signed integer for length, then fails with EINVAL if the length is negative.
If only someone would invent a datatype that could allow you to describe non-negative integer values efficiently.