Corrected type conversion in C file