From ccd06097c79218f7d5ea4c21721bbcbc7c467dca Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mon, 30 Dec 2013 17:22:26 -0500 Subject: 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. --- src/core/dbus-cgroup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/core/dbus-cgroup.c') 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"); -- cgit v1.2.3-54-g00ecf