diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-11-24 13:12:31 +0100 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-11-24 13:12:31 +0100 |
commit | 1dbf1002055627f473ac891d1ea309f1f3ddc2c3 (patch) | |
tree | bb61cb743edd255a153d0d3c18772a9c573a7744 | |
parent | 0d5f48f4339b984c2f5c44287984072506461fc9 (diff) |
logind: switch_session should return 0 on success
It currently returned -1 on failure and 1 on success. The API is
intended to return -1 on failure and 0 on success, so fix that.
-rw-r--r-- | libseat/backend/logind.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libseat/backend/logind.c b/libseat/backend/logind.c index 76297ce..f0cadce 100644 --- a/libseat/backend/logind.c +++ b/libseat/backend/logind.c @@ -172,7 +172,7 @@ static int switch_session(struct libseat *base, int s) { sd_bus_error_free(&error); sd_bus_message_unref(msg); - return ret >= 0; + return ret < 0 ? -1 : 0; } static int disable_seat(struct libseat *base) { |