diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-01-08 23:09:37 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-01-08 23:26:07 +0100 |
commit | 690f02f4b8f71b6b1ac84988ebbaf0bd4073c744 (patch) | |
tree | 4e0dd513146ba814f911a0c433b047b053000e97 /src/resolve/resolved.c | |
parent | Fix a few comments (diff) | |
download | systemd-690f02f4b8f71b6b1ac84988ebbaf0bd4073c744.tar.xz systemd-690f02f4b8f71b6b1ac84988ebbaf0bd4073c744.zip |
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/resolve/resolved.c')
-rw-r--r-- | src/resolve/resolved.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/resolve/resolved.c b/src/resolve/resolved.c index f4efddf8e5..0845b2c1ae 100644 --- a/src/resolve/resolved.c +++ b/src/resolve/resolved.c @@ -81,9 +81,7 @@ static int run(int argc, char *argv[]) { if (r < 0) return log_error_errno(r, "Event loop failed: %m"); - (void) sd_event_get_exit_code(m->event, &r); - - return r; + return 0; } DEFINE_MAIN_FUNCTION(run); |