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.
This commit is contained in:
Kenny Levinsen 2020-11-24 13:12:31 +01:00
parent 0d5f48f433
commit 1dbf100205

View file

@ -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) {