chiark / gitweb /
build-sys: move public header files into a dir of their own
[elogind.git] / src / stdout-syslog-bridge.c
index d50df22c88acf93d9770d938375eab82be62e4f4..e82716a1bdf1179dd03933698466fe27fd19d1da 100644 (file)
 #include <sys/un.h>
 #include <fcntl.h>
 
+#include <systemd/sd-daemon.h>
+
 #include "util.h"
 #include "log.h"
 #include "list.h"
-#include "sd-daemon.h"
 #include "tcpwrap.h"
 #include "def.h"
 
@@ -236,7 +237,6 @@ static int stream_log(Stream *s, char *p, usec_t ts) {
 
                         writev(console, iovec, 4);
                 }
-
         }
 
         return 0;
@@ -366,7 +366,6 @@ static int stream_process(Stream *s, usec_t ts) {
                 return -errno;
         }
 
-
         if (l == 0)
                 return 0;
 
@@ -409,8 +408,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) {