summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-01-08 23:09:37 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-01-08 23:26:07 +0100
commit690f02f4b8f71b6b1ac84988ebbaf0bd4073c744 (patch)
tree4e0dd513146ba814f911a0c433b047b053000e97 /src/machine
parent1b2a7d92afabd339afbd106e12d6c9ab5a6a00df (diff)
downloadsystemd-690f02f4b8f71b6b1ac84988ebbaf0bd4073c744.tar.gz
timesyncd,resolved,machinectl: drop calls to sd_event_get_exit_code()
In all three cases, sd_event_loop() will return the exit code anyway. If sd_event_loop() returns negative, failure is logged and results in an immediate return. Otherwise, we don't care if sd_event_loop() returns 0 or positive, because the return value feeds into DEFINE_MAIN_FUNCTION(), which doesn't make the distinction.
Diffstat (limited to 'src/machine')
-rw-r--r--src/machine/machinectl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index 44e6c76035..1e7cfc64d4 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -1309,7 +1309,7 @@ static int on_machine_removed(sd_bus_message *m, void *userdata, sd_bus_error *r
static int process_forward(sd_event *event, PTYForward **forward, int master, PTYForwardFlags flags, const char *name) {
char last_char = 0;
bool machine_died;
- int ret = 0, r;
+ int r;
assert(event);
assert(master >= 0);
@@ -1355,8 +1355,7 @@ static int process_forward(sd_event *event, PTYForward **forward, int master, PT
log_info("Connection to machine %s terminated.", name);
}
- sd_event_get_exit_code(event, &ret);
- return ret;
+ return 0;
}
static int parse_machine_uid(const char *spec, const char **machine, char **uid) {