summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-11-08 08:09:40 -0500
committerGitHub <noreply@github.com>2016-11-08 08:09:40 -0500
commita809cee58249cc2f42222f1ab5d4746d634c2668 (patch)
tree1dbd042bd61e17b01ad12143dfb171ecd4e7dbcd /src/libsystemd
parentb719b26cb34e8f2ac752ae7dca2c100b656195a4 (diff)
parent6e2b4a6994e29544cb25e5387961d8a9dcf65063 (diff)
Merge pull request #4612 from keszybz/format-strings
Format string tweaks (and a small fix on 32bit)
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-bus/bus-control.c4
-rw-r--r--src/libsystemd/sd-bus/bus-creds.c2
-rw-r--r--src/libsystemd/sd-bus/bus-dump.c2
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.c18
-rw-r--r--src/libsystemd/sd-bus/bus-socket.c2
-rw-r--r--src/libsystemd/sd-bus/test-bus-chat.c2
-rw-r--r--src/libsystemd/sd-login/sd-login.c2
-rw-r--r--src/libsystemd/sd-login/test-login.c2
-rw-r--r--src/libsystemd/sd-netlink/netlink-message.c2
-rw-r--r--src/libsystemd/sd-netlink/netlink-socket.c2
-rw-r--r--src/libsystemd/sd-netlink/rtnl-message.c2
11 files changed, 19 insertions, 21 deletions
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c
index 52128e7b5c..9e58ffbd88 100644
--- a/src/libsystemd/sd-bus/bus-control.c
+++ b/src/libsystemd/sd-bus/bus-control.c
@@ -264,7 +264,7 @@ static int kernel_get_list(sd_bus *bus, uint64_t flags, char ***x) {
if ((flags & KDBUS_LIST_UNIQUE) && name->id != previous_id && !(name->flags & KDBUS_HELLO_ACTIVATOR)) {
char *n;
- if (asprintf(&n, ":1.%llu", (unsigned long long) name->id) < 0) {
+ if (asprintf(&n, ":1.%llu", name->id) < 0) {
r = -ENOMEM;
goto fail;
}
@@ -711,7 +711,7 @@ int bus_get_name_creds_kdbus(
}
if (mask & SD_BUS_CREDS_UNIQUE_NAME) {
- if (asprintf(&c->unique_name, ":1.%llu", (unsigned long long) conn_info->id) < 0) {
+ if (asprintf(&c->unique_name, ":1.%llu", conn_info->id) < 0) {
r = -ENOMEM;
goto fail;
}
diff --git a/src/libsystemd/sd-bus/bus-creds.c b/src/libsystemd/sd-bus/bus-creds.c
index c4f693dee9..349fa57f2d 100644
--- a/src/libsystemd/sd-bus/bus-creds.c
+++ b/src/libsystemd/sd-bus/bus-creds.c
@@ -30,7 +30,7 @@
#include "cgroup-util.h"
#include "fd-util.h"
#include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
#include "hexdecoct.h"
#include "parse-util.h"
#include "process-util.h"
diff --git a/src/libsystemd/sd-bus/bus-dump.c b/src/libsystemd/sd-bus/bus-dump.c
index 21a6b20a11..f117c98c11 100644
--- a/src/libsystemd/sd-bus/bus-dump.c
+++ b/src/libsystemd/sd-bus/bus-dump.c
@@ -25,7 +25,7 @@
#include "cap-list.h"
#include "capability-util.h"
#include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
#include "locale-util.h"
#include "macro.h"
#include "string-util.h"
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index a3427ca33e..c82caeb3fc 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -42,7 +42,7 @@
#include "capability-util.h"
#include "fd-util.h"
#include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
#include "memfd-util.h"
#include "parse-util.h"
#include "stdio-util.h"
@@ -848,8 +848,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
if (k->src_id == KDBUS_SRC_ID_KERNEL)
bus_message_set_sender_driver(bus, m);
else {
- xsprintf(m->sender_buffer, ":1.%llu",
- (unsigned long long)k->src_id);
+ xsprintf(m->sender_buffer, ":1.%llu", k->src_id);
m->sender = m->creds.unique_name = m->sender_buffer;
}
@@ -860,8 +859,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
else if (k->dst_id == KDBUS_DST_ID_NAME)
m->destination = bus->unique_name; /* fill in unique name if the well-known name is missing */
else {
- xsprintf(m->destination_buffer, ":1.%llu",
- (unsigned long long)k->dst_id);
+ xsprintf(m->destination_buffer, ":1.%llu", k->dst_id);
m->destination = m->destination_buffer;
}
@@ -1035,7 +1033,7 @@ int bus_kernel_take_fd(sd_bus *b) {
b->bloom_size = (size_t) bloom->size;
b->bloom_n_hash = (unsigned) bloom->n_hash;
- if (asprintf(&b->unique_name, ":1.%llu", (unsigned long long) hello->id) < 0) {
+ if (asprintf(&b->unique_name, ":1.%llu", hello->id) < 0) {
r = -ENOMEM;
goto fail;
}
@@ -1207,7 +1205,7 @@ int bus_kernel_write_message(sd_bus *bus, sd_bus_message *m, bool hint_sync_call
return r;
}
} else {
- log_debug("Ignoring message with unknown payload type %llu.", (unsigned long long) k->payload_type);
+ log_debug("Ignoring message with unknown payload type %llu.", k->payload_type);
close_kdbus_msg(bus, k);
}
}
@@ -1268,7 +1266,7 @@ static int translate_name_change(
if (d->type == KDBUS_ITEM_NAME_ADD || (d->name_change.old_id.flags & (KDBUS_NAME_IN_QUEUE|KDBUS_NAME_ACTIVATOR)))
old_owner[0] = 0;
else
- sprintf(old_owner, ":1.%llu", (unsigned long long) d->name_change.old_id.id);
+ sprintf(old_owner, ":1.%llu", d->name_change.old_id.id);
if (d->type == KDBUS_ITEM_NAME_REMOVE || (d->name_change.new_id.flags & (KDBUS_NAME_IN_QUEUE|KDBUS_NAME_ACTIVATOR))) {
@@ -1277,7 +1275,7 @@ static int translate_name_change(
new_owner[0] = 0;
} else
- sprintf(new_owner, ":1.%llu", (unsigned long long) d->name_change.new_id.id);
+ sprintf(new_owner, ":1.%llu", d->name_change.new_id.id);
return push_name_owner_changed(bus, d->name_change.name, old_owner, new_owner, ts);
}
@@ -1419,7 +1417,7 @@ int bus_kernel_read_message(sd_bus *bus, bool hint_priority, int64_t priority) {
r = bus_kernel_translate_message(bus, k);
close_kdbus_msg(bus, k);
} else {
- log_debug("Ignoring message with unknown payload type %llu.", (unsigned long long) k->payload_type);
+ log_debug("Ignoring message with unknown payload type %llu.", k->payload_type);
r = 0;
close_kdbus_msg(bus, k);
}
diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
index cfd7753139..e6ed15eb71 100644
--- a/src/libsystemd/sd-bus/bus-socket.c
+++ b/src/libsystemd/sd-bus/bus-socket.c
@@ -30,7 +30,7 @@
#include "bus-message.h"
#include "bus-socket.h"
#include "fd-util.h"
-#include "formats-util.h"
+#include "format-util.h"
#include "hexdecoct.h"
#include "macro.h"
#include "missing.h"
diff --git a/src/libsystemd/sd-bus/test-bus-chat.c b/src/libsystemd/sd-bus/test-bus-chat.c
index fc60830059..0fc6fc90ed 100644
--- a/src/libsystemd/sd-bus/test-bus-chat.c
+++ b/src/libsystemd/sd-bus/test-bus-chat.c
@@ -30,7 +30,7 @@
#include "bus-match.h"
#include "bus-util.h"
#include "fd-util.h"
-#include "formats-util.h"
+#include "format-util.h"
#include "log.h"
#include "macro.h"
#include "util.h"
diff --git a/src/libsystemd/sd-login/sd-login.c b/src/libsystemd/sd-login/sd-login.c
index 3fcefada3f..42ea0badfc 100644
--- a/src/libsystemd/sd-login/sd-login.c
+++ b/src/libsystemd/sd-login/sd-login.c
@@ -31,7 +31,7 @@
#include "escape.h"
#include "fd-util.h"
#include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
#include "fs-util.h"
#include "hostname-util.h"
#include "io-util.h"
diff --git a/src/libsystemd/sd-login/test-login.c b/src/libsystemd/sd-login/test-login.c
index c1fd7dd33e..9de33d85db 100644
--- a/src/libsystemd/sd-login/test-login.c
+++ b/src/libsystemd/sd-login/test-login.c
@@ -24,7 +24,7 @@
#include "alloc-util.h"
#include "fd-util.h"
-#include "formats-util.h"
+#include "format-util.h"
#include "string-util.h"
#include "strv.h"
#include "util.h"
diff --git a/src/libsystemd/sd-netlink/netlink-message.c b/src/libsystemd/sd-netlink/netlink-message.c
index df3b3c922e..654a22fe3b 100644
--- a/src/libsystemd/sd-netlink/netlink-message.c
+++ b/src/libsystemd/sd-netlink/netlink-message.c
@@ -24,7 +24,7 @@
#include "sd-netlink.h"
#include "alloc-util.h"
-#include "formats-util.h"
+#include "format-util.h"
#include "missing.h"
#include "netlink-internal.h"
#include "netlink-types.h"
diff --git a/src/libsystemd/sd-netlink/netlink-socket.c b/src/libsystemd/sd-netlink/netlink-socket.c
index c165fa3359..a0fd8a3ac9 100644
--- a/src/libsystemd/sd-netlink/netlink-socket.c
+++ b/src/libsystemd/sd-netlink/netlink-socket.c
@@ -24,7 +24,7 @@
#include "sd-netlink.h"
#include "alloc-util.h"
-#include "formats-util.h"
+#include "format-util.h"
#include "missing.h"
#include "netlink-internal.h"
#include "netlink-types.h"
diff --git a/src/libsystemd/sd-netlink/rtnl-message.c b/src/libsystemd/sd-netlink/rtnl-message.c
index 09240c7b2a..b543b5f20c 100644
--- a/src/libsystemd/sd-netlink/rtnl-message.c
+++ b/src/libsystemd/sd-netlink/rtnl-message.c
@@ -23,7 +23,7 @@
#include "sd-netlink.h"
-#include "formats-util.h"
+#include "format-util.h"
#include "missing.h"
#include "netlink-internal.h"
#include "netlink-types.h"