summaryrefslogtreecommitdiff
path: root/src/stdout-syslog-bridge.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-12-31 00:59:37 +0100
committerLennart Poettering <lennart@poettering.net>2011-12-31 00:59:37 +0100
commitdc1ecd78e9f046880d10ddb45cf9b06df1084b10 (patch)
tree696491346a7fa69f8620a99cb7c0d2d87f2da7cf /src/stdout-syslog-bridge.c
parent69b1c67463de64fb32ba75f586f0c9d2716f3e02 (diff)
parent74ef2d16ada74db3059d825ce8d24ea74946bf8f (diff)
Merge branch 'journal'
Diffstat (limited to 'src/stdout-syslog-bridge.c')
-rw-r--r--src/stdout-syslog-bridge.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/stdout-syslog-bridge.c b/src/stdout-syslog-bridge.c
index 9a0408819e..6ec23ec612 100644
--- a/src/stdout-syslog-bridge.c
+++ b/src/stdout-syslog-bridge.c
@@ -236,7 +236,6 @@ static int stream_log(Stream *s, char *p, usec_t ts) {
writev(console, iovec, 4);
}
-
}
return 0;
@@ -366,7 +365,6 @@ static int stream_process(Stream *s, usec_t ts) {
return -errno;
}
-
if (l == 0)
return 0;
@@ -409,8 +407,10 @@ static int stream_new(Server *s, int server_fd) {
int r;
assert(s);
+ assert(server_fd >= 0);
- if ((fd = accept4(server_fd, NULL, NULL, SOCK_NONBLOCK|SOCK_CLOEXEC)) < 0)
+ fd = accept4(server_fd, NULL, NULL, SOCK_NONBLOCK|SOCK_CLOEXEC);
+ if (fd < 0)
return -errno;
if (s->n_streams >= STREAMS_MAX) {
@@ -649,7 +649,8 @@ int main(int argc, char *argv[]) {
umask(0022);
- if ((n = sd_listen_fds(true)) < 0) {
+ n = sd_listen_fds(true);
+ if (n < 0) {
log_error("Failed to read listening file descriptors from environment: %s", strerror(-r));
return EXIT_FAILURE;
}