summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-17 03:14:20 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-17 15:42:33 +0100
commit603938e0a9b5379984d7397e3cf81683c0037a53 (patch)
tree241e410d6fbc4fe777bc7d09d41d38b5fa5c61e0 /src
parent15e913230c652ace36abfbf2b6fed0c1f56b8711 (diff)
activate: fix error checking on epoll_ctl()
Diffstat (limited to 'src')
-rw-r--r--src/activate/activate.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/activate/activate.c b/src/activate/activate.c
index d73c16e8ab..cf545d61f7 100644
--- a/src/activate/activate.c
+++ b/src/activate/activate.c
@@ -51,10 +51,12 @@ static int add_epoll(int epoll_fd, int fd) {
ev.data.fd = fd;
r = epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &ev);
- if (r < 0)
- log_error("Failed to add event on epoll fd:%d for fd:%d: %m",
- epoll_fd, fd);
- return -errno;
+ if (r < 0) {
+ log_error("Failed to add event on epoll fd:%d for fd:%d: %m", epoll_fd, fd);
+ return -errno;
+ }
+
+ return 0;
}
static int make_socket_fd(const char* address, int flags) {