May be it would best solution to write wrapper for strbuf_getline (without third parameter) with name strbuf_getline_with_any_ending and use it as replacement for strbuf_getline in such cases? (when we don't care about exact line ending)