summaryrefslogtreecommitdiff
path: root/src/stdio-bridge/stdio-bridge.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio-bridge/stdio-bridge.c')
-rw-r--r--src/stdio-bridge/stdio-bridge.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/stdio-bridge/stdio-bridge.c b/src/stdio-bridge/stdio-bridge.c
index 91eace90e2..ce8efce3d5 100644
--- a/src/stdio-bridge/stdio-bridge.c
+++ b/src/stdio-bridge/stdio-bridge.c
@@ -190,7 +190,7 @@ int main(int argc, char *argv[]) {
}
for (;;) {
- _cleanup_(sd_bus_message_unrefp)sd_bus_message *m = NULL;
+ _cleanup_(sd_bus_message_unrefp)sd_bus_message *m = NULL;
int events_a, events_b, fd;
uint64_t timeout_a, timeout_b, t;
struct timespec _ts, *ts;
@@ -234,12 +234,14 @@ int main(int argc, char *argv[]) {
fd = sd_bus_get_fd(a);
if (fd < 0) {
+ r = fd;
log_error_errno(r, "Failed to get fd: %m");
goto finish;
}
events_a = sd_bus_get_events(a);
if (events_a < 0) {
+ r = events_a;
log_error_errno(r, "Failed to get events mask: %m");
goto finish;
}
@@ -252,6 +254,7 @@ int main(int argc, char *argv[]) {
events_b = sd_bus_get_events(b);
if (events_b < 0) {
+ r = events_b;
log_error_errno(r, "Failed to get events mask: %m");
goto finish;
}
@@ -294,8 +297,6 @@ int main(int argc, char *argv[]) {
}
}
- r = 0;
-
finish:
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}