summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-02-15 18:10:36 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-02-17 02:26:22 -0500
commitfb4729006a7174472e8a435b0887e532cd6217fc (patch)
tree50b1e1b0750e2cffe9cda249f5b9537042c007fe /src/journal
parent141a79f491fd4bf5ea0d66039065c9f9649bfc0e (diff)
Some modernizations
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journald-console.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/journal/journald-console.c b/src/journal/journald-console.c
index 04c4424a4..35da52af2 100644
--- a/src/journal/journald-console.c
+++ b/src/journal/journald-console.c
@@ -55,7 +55,7 @@ void server_forward_console(
struct timespec ts;
char tbuf[4 + DECIMAL_STR_MAX(ts.tv_sec) + DECIMAL_STR_MAX(ts.tv_nsec)-3 + 1];
int n = 0, fd;
- char *ident_buf = NULL;
+ _cleanup_free_ char *ident_buf = NULL;
const char *tty;
assert(s);
@@ -101,14 +101,11 @@ void server_forward_console(
fd = open_terminal(tty, O_WRONLY|O_NOCTTY|O_CLOEXEC);
if (fd < 0) {
log_debug("Failed to open %s for logging: %m", tty);
- goto finish;
+ return;
}
if (writev(fd, iovec, n) < 0)
log_debug("Failed to write to %s for logging: %m", tty);
close_nointr_nofail(fd);
-
-finish:
- free(ident_buf);
}