Beforehand we just prepended the eol to the next line, so that
the last line also gets eol.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
va_start(ap, fmt);
vsnprintf(buf, LARGE_SIZE, fmt, ap);
va_end(ap);
- if (len)
- format = "\n%s";
- else
- format = "%s";
+ format = "%s\n";
write_data(format, buf);
}
vsnprintf(buf, LARGE_SIZE, fmt, ap);
va_end(ap);
- const char *eol;
- if (len)
- eol = "\n";
- else
- eol = "";
-
- write_data("%s%s", eol, buf);
+ write_data("%s\n", buf);
}