aboutsummaryrefslogtreecommitdiff
path: root/libseat/backend
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2020-11-24 13:12:31 +0100
committerKenny Levinsen <kl@kl.wtf>2020-11-24 13:12:31 +0100
commit1dbf1002055627f473ac891d1ea309f1f3ddc2c3 (patch)
treebb61cb743edd255a153d0d3c18772a9c573a7744 /libseat/backend
parent0d5f48f4339b984c2f5c44287984072506461fc9 (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.
Diffstat (limited to 'libseat/backend')
-rw-r--r--libseat/backend/logind.c2
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) {