From 606eda045bc3608977648fb1de61d8e328984d30 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 25 Jun 2018 16:56:45 +0300 Subject: Removed '\r' and '\n' artifact macros. --- src/nxt_log.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nxt_log.c') diff --git a/src/nxt_log.c b/src/nxt_log.c index 992c3205..1c666961 100644 --- a/src/nxt_log.c +++ b/src/nxt_log.c @@ -92,16 +92,16 @@ nxt_log_handler(nxt_uint_t level, nxt_log_t *log, const char *fmt, ...) p = log->ctx_handler(log->ctx, p, end); } - if (p > end - NXT_LINEFEED_SIZE) { - p = end - NXT_LINEFEED_SIZE; + if (p > end - nxt_length("\n")) { + p = end - nxt_length("\n"); } - nxt_linefeed(p); + *p++ = '\n'; (void) nxt_write_console(nxt_stderr, msg, p - msg); if (level == NXT_LOG_ALERT) { - *(p - NXT_LINEFEED_SIZE) = '\0'; + *(p - nxt_length("\n")) = '\0'; /* * Syslog LOG_ALERT level is enough, because -- cgit