The getline function's return value was previously ignored, causing gcc to emit a warning that was treated as an error during build. This commit captures the return value in a ssize_t variable and adds a check for -1 (indicating read failure) to the existing feof(stdin) condition, ensuring both EOF and error conditions are properly handled.