minor code cleanup
always convert C integer values to 1/0 when testing them for their boolean value