From 102d8f8169427cb68cdebf5ee0f0e07788e9c2b2 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 7 Nov 2013 02:03:10 +0100 Subject: consistently use "int" when retrieving "bool" from bus messages --- src/libsystemd-bus/bus-message.c | 2 +- src/libsystemd-bus/bus-util.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsystemd-bus') diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c index 67f7d58a45..9543ae3b26 100644 --- a/src/libsystemd-bus/bus-message.c +++ b/src/libsystemd-bus/bus-message.c @@ -2669,7 +2669,7 @@ _public_ int sd_bus_message_read_basic(sd_bus_message *m, char type, void *p) { case SD_BUS_TYPE_BOOLEAN: if (p) - *(unsigned*) p = !!*(uint32_t*) q; + *(int*) p = !!*(uint32_t*) q; break; case SD_BUS_TYPE_INT16: diff --git a/src/libsystemd-bus/bus-util.c b/src/libsystemd-bus/bus-util.c index 3bb1fb724d..13ad4442ba 100644 --- a/src/libsystemd-bus/bus-util.c +++ b/src/libsystemd-bus/bus-util.c @@ -151,7 +151,7 @@ int bus_verify_polkit( #ifdef ENABLE_POLKIT else { _cleanup_bus_message_unref_ sd_bus_message *reply = NULL; - unsigned authorized = false, challenge = false; + int authorized = false, challenge = false; r = sd_bus_call_method( bus, @@ -270,7 +270,7 @@ int bus_verify_polkit_async( #ifdef ENABLE_POLKIT q = hashmap_remove(*registry, m); if (q) { - unsigned authorized, challenge; + int authorized, challenge; /* This is the second invocation of this function, and * there's already a response from polkit, let's -- cgit v1.2.3-54-g00ecf