Write a short C function that clamps an integer to a range.