minor C code simplification