Making a C function ever-so-slightly safer.