summaryrefslogtreecommitdiff
path: root/src/timedate/timedated.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-11-07 02:03:10 +0100
committerKay Sievers <kay@vrfy.org>2013-11-07 02:05:57 +0100
commit102d8f8169427cb68cdebf5ee0f0e07788e9c2b2 (patch)
tree37c502ff4285790da20ab9c8d550aed8daceb05b /src/timedate/timedated.c
parentba341e7c3c18e81a6faa58883e178a60af317a40 (diff)
consistently use "int" when retrieving "bool" from bus messages
Diffstat (limited to 'src/timedate/timedated.c')
-rw-r--r--src/timedate/timedated.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index f5d2201cea..163b2761ac 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -523,7 +523,7 @@ static int method_set_timezone(sd_bus *bus, sd_bus_message *m, void *userdata) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
Context *c = userdata;
const char *z;
- unsigned interactive;
+ int interactive;
char *t;
int r;
@@ -587,7 +587,7 @@ static int method_set_timezone(sd_bus *bus, sd_bus_message *m, void *userdata) {
static int method_set_local_rtc(sd_bus *bus, sd_bus_message *m, void *userdata) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
- unsigned lrtc, fix_system, interactive;
+ int lrtc, fix_system, interactive;
Context *c = userdata;
struct timespec ts;
int r;
@@ -671,7 +671,7 @@ static int method_set_local_rtc(sd_bus *bus, sd_bus_message *m, void *userdata)
static int method_set_time(sd_bus *bus, sd_bus_message *m, void *userdata) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
- unsigned relative, interactive;
+ int relative, interactive;
Context *c = userdata;
int64_t utc;
struct timespec ts;
@@ -737,7 +737,7 @@ static int method_set_time(sd_bus *bus, sd_bus_message *m, void *userdata) {
static int method_set_ntp(sd_bus *bus, sd_bus_message *m, void *userdata) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
- unsigned ntp, interactive;
+ int ntp, interactive;
Context *c = userdata;
int r;
@@ -745,7 +745,7 @@ static int method_set_ntp(sd_bus *bus, sd_bus_message *m, void *userdata) {
if (r < 0)
return sd_bus_reply_method_errno(bus, m, r, NULL);
- if (ntp == c->use_ntp)
+ if ((bool)ntp == c->use_ntp)
return sd_bus_reply_method_return(bus, m, NULL);
r = bus_verify_polkit_async(bus, &c->polkit_registry, m, "org.freedesktop.timedate1.set-ntp", interactive, &error, method_set_ntp, c);