From f9c3c1380c63532c9ddc02ed84d26cd987a20fb3 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Sat, 11 Jun 2016 11:06:54 +0100 Subject: [PATCH] Minor refactoring --- src/dinit-log.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/dinit-log.cc b/src/dinit-log.cc index af7b1d5..2bafd6b 100644 --- a/src/dinit-log.cc +++ b/src/dinit-log.cc @@ -259,12 +259,7 @@ template static void do_log(T ... args) noexcept int amount = sum_length(args...); if (log_stream[DLOG_CONS].get_free() >= amount) { append(log_stream[DLOG_CONS], args...); - - bool was_first = (log_stream[DLOG_CONS].current_index == 0); - log_stream[DLOG_CONS].current_index += amount; - if (was_first && log_to_console) { - log_stream[DLOG_CONS].setEnabled(&eventLoop, true); - } + log_stream[DLOG_CONS].commit_msg(); } else { // TODO mark a discarded message -- 2.25.1