Clean up a bit of C logic, and fix an erroneous warning.