From fe1ed553b33d133c405149e06701889a848732c3 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 8 Jul 2022 06:20:03 +0900 Subject: [PATCH] core: shorten code a bit --- src/core/dbus-cgroup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c index 7e95f0e390..4fc4fb0021 100644 --- a/src/core/dbus-cgroup.c +++ b/src/core/dbus-cgroup.c @@ -1439,12 +1439,11 @@ int bus_cgroup_set_property( } else if (STR_IN_SET(name, "BlockIOReadBandwidth", "BlockIOWriteBandwidth")) { const char *path; - bool read = true; unsigned n = 0; uint64_t u64; + bool read; - if (streq(name, "BlockIOWriteBandwidth")) - read = false; + read = streq(name, "BlockIOReadBandwidth"); r = sd_bus_message_enter_container(message, 'a', "(st)"); if (r < 0)