From: Timo Sirainen Date: Fri, 31 Aug 2018 11:30:21 +0000 (+0300) Subject: lib: failures - Move adding LF from default_format() to default_write() X-Git-Tag: 2.3.9~1473 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dbf74d99542ce57859215e6d93a506a78a99b222;p=thirdparty%2Fdovecot%2Fcore.git lib: failures - Move adding LF from default_format() to default_write() This makes it similar to internal_format/write() --- diff --git a/src/lib/failures.c b/src/lib/failures.c index 03c6445245..c2cb9f1ca4 100644 --- a/src/lib/failures.c +++ b/src/lib/failures.c @@ -72,7 +72,6 @@ static string_t * ATTR_FORMAT(3, 0) default_format(const struct failure_context /* make sure there's no %n in there and fix %m */ str_vprintfa(str, printf_format_fix(format), args); - str_append_c(str, '\n'); return str; } @@ -91,6 +90,7 @@ static int default_write(enum log_type type, string_t *data, size_t prefix_len A fd = log_fd; break; } + str_append_c(data, '\n'); return log_fd_write(fd, str_data(data), str_len(data)); }