summaryrefslogtreecommitdiffstats
path: root/src/basic/log.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-08-20 17:29:49 +0200
committerLennart Poettering <lennart@poettering.net>2019-08-20 17:29:49 +0200
commite11a5c72baa638311bdd66bfb74f843515e0f83b (patch)
tree90706bd89bdbb34abc89567138ebd023d7cb9d78 /src/basic/log.c
parentupdate TODO (diff)
downloadsystemd-e11a5c72baa638311bdd66bfb74f843515e0f83b.tar.xz
systemd-e11a5c72baa638311bdd66bfb74f843515e0f83b.zip
log: cast various log_open() calls to (void)
Diffstat (limited to '')
-rw-r--r--src/basic/log.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/basic/log.c b/src/basic/log.c
index f047203271..6095f0fdec 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();
}