Fix the return value of fgets().