summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hostname/hostnamed.c6
-rw-r--r--src/libsystemd-bus/bus-message.c2
-rw-r--r--src/libsystemd-bus/bus-util.c4
-rw-r--r--src/locale/localed.c4
-rw-r--r--src/timedate/timedated.c10
5 files changed, 13 insertions, 13 deletions
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 0854bc412f..35dccf8cb6 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -371,7 +371,7 @@ static int method_set_hostname(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 *name;
- unsigned interactive;
+ int interactive;
char *h;
int r;
@@ -421,7 +421,7 @@ static int method_set_static_hostname(sd_bus *bus, sd_bus_message *m, void *user
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
Context *c = userdata;
const char *name;
- unsigned interactive;
+ int interactive;
int r;
r = sd_bus_message_read(m, "sb", &name, &interactive);
@@ -472,7 +472,7 @@ static int method_set_static_hostname(sd_bus *bus, sd_bus_message *m, void *user
static int set_machine_info(Context *c, sd_bus *bus, sd_bus_message *m, int prop, sd_bus_message_handler_t cb) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
- unsigned interactive;
+ int interactive;
const char *name;
int r;
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
diff --git a/src/locale/localed.c b/src/locale/localed.c
index 61a3015ead..744d304c6d 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -908,7 +908,7 @@ static int method_set_vc_keyboard(sd_bus *bus, sd_bus_message *m, void *userdata
Context *c = userdata;
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
const char *keymap, *keymap_toggle;
- unsigned convert, interactive;
+ int convert, interactive;
int r;
r = sd_bus_message_read(m, "ssbb", &keymap, &keymap_toggle, &convert, &interactive);
@@ -971,7 +971,7 @@ static int method_set_x11_keyboard(sd_bus *bus, sd_bus_message *m, void *userdat
Context *c = userdata;
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
const char *layout, *model, *variant, *options;
- unsigned convert, interactive;
+ int convert, interactive;
int r;
r = sd_bus_message_read(m, "ssssbb", &layout, &model, &variant, &options, &convert, &interactive);
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);