]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: failures - Move adding LF from default_format() to default_write()
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 31 Aug 2018 11:30:21 +0000 (14:30 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 3 Sep 2018 08:46:58 +0000 (08:46 +0000)
This makes it similar to internal_format/write()

src/lib/failures.c

index 03c644524517380be67818e811bc515a66535d59..c2cb9f1ca4bf5a0474c7d4200d14a743da46cb0a 100644 (file)
@@ -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));
 }