aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server.c5
-rw-r--r--terminal.c22
-rw-r--r--wayland.c11
3 files changed, 8 insertions, 30 deletions
diff --git a/server.c b/server.c
index 4ca2ada6..42b7ec2b 100644
--- a/server.c
+++ b/server.c
@@ -196,7 +196,6 @@ fdm_server(struct fdm *fdm, int fd, int events, void *data)
};
if (!fdm_add(server->fdm, client_fd, EPOLLIN, &fdm_client, client)) {
- LOG_ERR("client FD=%d: failed to add client to FDM", client_fd);
close(client_fd);
free(client);
return false;
@@ -321,10 +320,8 @@ server_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl)
.clients = tll_init(),
};
- if (!fdm_add(fdm, fd, EPOLLIN, &fdm_server, server)) {
- LOG_ERR("failed to add server FD to the FDM");
+ if (!fdm_add(fdm, fd, EPOLLIN, &fdm_server, server))
goto err;
- }
return server;
diff --git a/terminal.c b/terminal.c
index ccc6ec41..2a362b70 100644
--- a/terminal.c
+++ b/terminal.c
@@ -328,25 +328,12 @@ term_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl,
goto close_fds;
}
- if (!fdm_add(fdm, ptmx, EPOLLIN, &fdm_ptmx, term)) {
- LOG_ERR("failed to add ptmx to FDM");
- goto err;
- }
-
- if (!fdm_add(fdm, flash_fd, EPOLLIN, &fdm_flash, term)) {
- LOG_ERR("failed to add flash timer FD to FDM");
- goto err;
- }
-
- if (!fdm_add(fdm, blink_fd, EPOLLIN, &fdm_blink, term)) {
- LOG_ERR("failed to add blink tiemr FD to FDM");
- goto err;
- }
-
- if (!fdm_add(fdm, delay_lower_fd, EPOLLIN, &fdm_delayed_render, term) ||
+ if (!fdm_add(fdm, ptmx, EPOLLIN, &fdm_ptmx, term) ||
+ !fdm_add(fdm, flash_fd, EPOLLIN, &fdm_flash, term) ||
+ !fdm_add(fdm, blink_fd, EPOLLIN, &fdm_blink, term) ||
+ !fdm_add(fdm, delay_lower_fd, EPOLLIN, &fdm_delayed_render, term) ||
!fdm_add(fdm, delay_upper_fd, EPOLLIN, &fdm_delayed_render, term))
{
- LOG_ERR("failed to add delayed rendering timer FDs to FDM");
goto err;
}
@@ -538,7 +525,6 @@ term_shutdown(struct terminal *term)
}
if (!fdm_add(term->fdm, event_fd, EPOLLIN, &fdm_shutdown, term)) {
- LOG_ERR("failed to add terminal shutdown event FD to the FDM");
close(event_fd);
return false;
}
diff --git a/wayland.c b/wayland.c
index 2bbf8c2e..f4cba71c 100644
--- a/wayland.c
+++ b/wayland.c
@@ -522,14 +522,9 @@ wayl_init(struct fdm *fdm)
goto out;
}
- int wl_fd = wl_display_get_fd(wayl->display);
- if (!fdm_add(fdm, wl_fd, EPOLLIN, &fdm_wayl, wayl)) {
- LOG_ERR("failed to register Wayland connection with the FDM");
- goto out;
- }
-
- if (!fdm_add(fdm, wayl->kbd.repeat.fd, EPOLLIN, &fdm_repeat, wayl)) {
- LOG_ERR("failed to register keyboard repeat timer with the FDM");
+ if (!fdm_add(fdm, wl_display_get_fd(wayl->display), EPOLLIN, &fdm_wayl, wayl) ||
+ !fdm_add(fdm, wayl->kbd.repeat.fd, EPOLLIN, &fdm_repeat, wayl))
+ {
goto out;
}