summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/logind-dbus.c4
-rw-r--r--src/logind-seat-dbus.c4
-rw-r--r--src/logind-seat.c3
-rw-r--r--src/logind-session-dbus.c6
-rw-r--r--src/logind-user-dbus.c5
5 files changed, 11 insertions, 11 deletions
diff --git a/src/logind-dbus.c b/src/logind-dbus.c
index f73307f806..662ffd0be5 100644
--- a/src/logind-dbus.c
+++ b/src/logind-dbus.c
@@ -130,13 +130,13 @@
static int bus_manager_append_idle_hint(DBusMessageIter *i, const char *property, void *data) {
Manager *m = data;
- bool b;
+ dbus_bool_t b;
assert(i);
assert(property);
assert(m);
- b = manager_get_idle_hint(m, NULL);
+ b = manager_get_idle_hint(m, NULL) > 0;
if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
return -ENOMEM;
diff --git a/src/logind-seat-dbus.c b/src/logind-seat-dbus.c
index 1895fe6cc3..4a4527d01d 100644
--- a/src/logind-seat-dbus.c
+++ b/src/logind-seat-dbus.c
@@ -151,13 +151,13 @@ static int bus_seat_append_can_activate(DBusMessageIter *i, const char *property
static int bus_seat_append_idle_hint(DBusMessageIter *i, const char *property, void *data) {
Seat *s = data;
- bool b;
+ dbus_bool_t b;
assert(i);
assert(property);
assert(s);
- b = seat_get_idle_hint(s, NULL);
+ b = seat_get_idle_hint(s, NULL) > 0;
if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
return -ENOMEM;
diff --git a/src/logind-seat.c b/src/logind-seat.c
index 09356b6b09..12a1b80647 100644
--- a/src/logind-seat.c
+++ b/src/logind-seat.c
@@ -230,8 +230,7 @@ int seat_set_active(Seat *s, Session *session) {
Session *old_active;
assert(s);
- assert(session);
- assert(session->seat == s);
+ assert(!session || session->seat == s);
if (session == s->active)
return 0;
diff --git a/src/logind-session-dbus.c b/src/logind-session-dbus.c
index 0ce880c590..b0e592d215 100644
--- a/src/logind-session-dbus.c
+++ b/src/logind-session-dbus.c
@@ -144,7 +144,7 @@ static int bus_session_append_user(DBusMessageIter *i, const char *property, voi
static int bus_session_append_active(DBusMessageIter *i, const char *property, void *data) {
Session *s = data;
- bool b;
+ dbus_bool_t b;
assert(i);
assert(property);
@@ -159,13 +159,13 @@ static int bus_session_append_active(DBusMessageIter *i, const char *property, v
static int bus_session_append_idle_hint(DBusMessageIter *i, const char *property, void *data) {
Session *s = data;
- bool b;
+ int b;
assert(i);
assert(property);
assert(s);
- b = session_get_idle_hint(s, NULL);
+ b = session_get_idle_hint(s, NULL) > 0;
if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
return -ENOMEM;
diff --git a/src/logind-user-dbus.c b/src/logind-user-dbus.c
index 623f2c9c24..5926dcfbc7 100644
--- a/src/logind-user-dbus.c
+++ b/src/logind-user-dbus.c
@@ -154,13 +154,14 @@ static int bus_user_append_sessions(DBusMessageIter *i, const char *property, vo
static int bus_user_append_idle_hint(DBusMessageIter *i, const char *property, void *data) {
User *u = data;
- bool b;
+ dbus_bool_t b;
assert(i);
assert(property);
assert(u);
- b = user_get_idle_hint(u, NULL);
+ b = user_get_idle_hint(u, NULL) > 0;
+
if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
return -ENOMEM;