]> 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)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Fri, 7 Sep 2018 07:39:12 +0000 (10:39 +0300)
This makes it similar to internal_format/write()

src/lib/failures.c

index 4877636d350677a891a8e3189844bbc2b5554563..522ebb27d89394797f39df9244e824f024ce1d16 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));
 }