From: Lennart Poettering Date: Tue, 20 Aug 2019 15:29:49 +0000 (+0200) Subject: log: cast various log_open() calls to (void) X-Git-Tag: v243-rc2~11^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e11a5c72baa638311bdd66bfb74f843515e0f83b;p=thirdparty%2Fsystemd.git log: cast various log_open() calls to (void) --- diff --git a/src/basic/log.c b/src/basic/log.c index f0472032716..6095f0fdec9 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -372,13 +372,11 @@ static int write_to_console( if (errno == EIO && getpid_cached() == 1) { - /* If somebody tried to kick us from our - * console tty (via vhangup() or suchlike), - * try to reconnect */ + /* If somebody tried to kick us from our console tty (via vhangup() or suchlike), try + * to reconnect. */ log_close_console(); - log_open_console(); - + (void) log_open_console(); if (console_fd < 0) return 0; @@ -586,7 +584,7 @@ int log_dispatch_internal( level |= log_facility; if (open_when_needed) - log_open(); + (void) log_open(); do { char *e; @@ -629,7 +627,7 @@ int log_dispatch_internal( k = write_to_kmsg(level, error, file, line, func, buffer); if (k < 0) { log_close_kmsg(); - log_open_console(); + (void) log_open_console(); } } @@ -795,7 +793,7 @@ _noreturn_ void log_assert_failed_realm( const char *file, int line, const char *func) { - log_open(); + (void) log_open(); log_assert(LOG_REALM_PLUS_LEVEL(realm, LOG_CRIT), text, file, line, func, "Assertion '%s' failed at %s:%u, function %s(). Aborting."); abort(); @@ -807,7 +805,7 @@ _noreturn_ void log_assert_failed_unreachable_realm( const char *file, int line, const char *func) { - log_open(); + (void) log_open(); log_assert(LOG_REALM_PLUS_LEVEL(realm, LOG_CRIT), text, file, line, func, "Code should not be reached '%s' at %s:%u, function %s(). Aborting."); abort(); @@ -1356,5 +1354,5 @@ void log_setup_service(void) { log_set_target(LOG_TARGET_AUTO); log_parse_environment(); - log_open(); + (void) log_open(); }