src/ros.c: Check the return value of fgets().