1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-08 21:17:47 +03:00

log: cast various log_open() calls to (void)

This commit is contained in:
Lennart Poettering 2019-08-20 17:29:49 +02:00
parent 97e5cc8818
commit e11a5c72ba

View File

@ -372,13 +372,11 @@ static int write_to_console(
if (errno == EIO && getpid_cached() == 1) { if (errno == EIO && getpid_cached() == 1) {
/* If somebody tried to kick us from our /* If somebody tried to kick us from our console tty (via vhangup() or suchlike), try
* console tty (via vhangup() or suchlike), * to reconnect. */
* try to reconnect */
log_close_console(); log_close_console();
log_open_console(); (void) log_open_console();
if (console_fd < 0) if (console_fd < 0)
return 0; return 0;
@ -586,7 +584,7 @@ int log_dispatch_internal(
level |= log_facility; level |= log_facility;
if (open_when_needed) if (open_when_needed)
log_open(); (void) log_open();
do { do {
char *e; char *e;
@ -629,7 +627,7 @@ int log_dispatch_internal(
k = write_to_kmsg(level, error, file, line, func, buffer); k = write_to_kmsg(level, error, file, line, func, buffer);
if (k < 0) { if (k < 0) {
log_close_kmsg(); log_close_kmsg();
log_open_console(); (void) log_open_console();
} }
} }
@ -795,7 +793,7 @@ _noreturn_ void log_assert_failed_realm(
const char *file, const char *file,
int line, int line,
const char *func) { const char *func) {
log_open(); (void) log_open();
log_assert(LOG_REALM_PLUS_LEVEL(realm, LOG_CRIT), text, file, line, func, log_assert(LOG_REALM_PLUS_LEVEL(realm, LOG_CRIT), text, file, line, func,
"Assertion '%s' failed at %s:%u, function %s(). Aborting."); "Assertion '%s' failed at %s:%u, function %s(). Aborting.");
abort(); abort();
@ -807,7 +805,7 @@ _noreturn_ void log_assert_failed_unreachable_realm(
const char *file, const char *file,
int line, int line,
const char *func) { const char *func) {
log_open(); (void) log_open();
log_assert(LOG_REALM_PLUS_LEVEL(realm, LOG_CRIT), text, file, line, func, 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."); "Code should not be reached '%s' at %s:%u, function %s(). Aborting.");
abort(); abort();
@ -1356,5 +1354,5 @@ void log_setup_service(void) {
log_set_target(LOG_TARGET_AUTO); log_set_target(LOG_TARGET_AUTO);
log_parse_environment(); log_parse_environment();
log_open(); (void) log_open();
} }