summaryrefslogtreecommitdiff
path: root/src/core/dbus-cgroup.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-30 17:22:26 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-02 19:45:47 -0500
commitccd06097c79218f7d5ea4c21721bbcbc7c467dca (patch)
tree168bee7d15161c2c1cba3926447162b84c761898 /src/core/dbus-cgroup.c
parentab9001a1e3dc6e60d0cdf53363dc5d18dcc382fd (diff)
Use format patterns for usec_t, pid_t, nsec_t, usec_t
It is nicer to predefine patterns using configure time check instead of using casts everywhere. Since we do not need to use any flags, include "%" in the format instead of excluding it like PRI* macros.
Diffstat (limited to 'src/core/dbus-cgroup.c')
-rw-r--r--src/core/dbus-cgroup.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
index 861bb16445..792f37eef5 100644
--- a/src/core/dbus-cgroup.c
+++ b/src/core/dbus-cgroup.c
@@ -321,10 +321,9 @@ int bus_cgroup_set_property(
if (r < 0)
return r;
- while (( r = sd_bus_message_read(message, "(st)", &path, &u64)) > 0) {
- unsigned long ul;
+ while ((r = sd_bus_message_read(message, "(st)", &path, &u64)) > 0) {
+ unsigned long ul = u64;
- ul = (unsigned long) u64;
if (ul < 10 || ul > 1000)
return sd_bus_error_set_errnof(error, EINVAL, "BlockIODeviceWeight out of range");