diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-12 16:03:48 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-12 16:03:48 +0100 |
commit | 45630488f9dc510c0b9da1932c5046160e6871ec (patch) | |
tree | 43606871b8012973ac6f3936d4887a5c658ce097 /src/libsystemd | |
parent | 1f52a79d4eb0216bf1f2d96539609f02d8bb9e71 (diff) | |
parent | d054f0a4d451120c26494263fc4dc175bfd405b1 (diff) |
Merge pull request #2308 from zonque/xsprintf
tree-wide: use xsprintf() where applicable
Diffstat (limited to 'src/libsystemd')
-rw-r--r-- | src/libsystemd/sd-bus/bus-kernel.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c index 6c05444e9a..b2d685855e 100644 --- a/src/libsystemd/sd-bus/bus-kernel.c +++ b/src/libsystemd/sd-bus/bus-kernel.c @@ -47,6 +47,7 @@ #include "formats-util.h" #include "memfd-util.h" #include "parse-util.h" +#include "stdio-util.h" #include "string-util.h" #include "strv.h" #include "user-util.h" @@ -849,7 +850,8 @@ 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 { - snprintf(m->sender_buffer, sizeof(m->sender_buffer), ":1.%llu", (unsigned long long) k->src_id); + xsprintf(m->sender_buffer, ":1.%llu", + (unsigned long long)k->src_id); m->sender = m->creds.unique_name = m->sender_buffer; } @@ -860,7 +862,8 @@ 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 { - snprintf(m->destination_buffer, sizeof(m->destination_buffer), ":1.%llu", (unsigned long long) k->dst_id); + xsprintf(m->destination_buffer, ":1.%llu", + (unsigned long long)k->dst_id); m->destination = m->destination_buffer; } |