Fix signedness of getline() return value