projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15e9132
)
activate: fix error checking on epoll_ctl()
author
Lennart Poettering
<lennart@poettering.net>
Tue, 17 Dec 2013 02:14:20 +0000
(
03:14
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 17 Dec 2013 14:42:33 +0000
(15:42 +0100)
src/activate/activate.c
patch
|
blob
|
history
diff --git
a/src/activate/activate.c
b/src/activate/activate.c
index
d73c16e
..
cf545d6
100644
(file)
--- 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) {