From: Yu Watanabe Date: Thu, 10 May 2018 13:25:00 +0000 (+0900) Subject: core: simplify property_get_cpu_affinity() X-Git-Tag: v239~276^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3bc33e6c60197605c51ca69d221fc9799f39841;p=thirdparty%2Fsystemd.git core: simplify property_get_cpu_affinity() --- diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index 9d302b0a114..8fba8e48b53 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -274,10 +274,7 @@ static int property_get_cpu_affinity( assert(reply); assert(c); - if (c->cpuset) - return sd_bus_message_append_array(reply, 'y', c->cpuset, CPU_ALLOC_SIZE(c->cpuset_ncpus)); - else - return sd_bus_message_append_array(reply, 'y', NULL, 0); + return sd_bus_message_append_array(reply, 'y', c->cpuset, CPU_ALLOC_SIZE(c->cpuset_ncpus)); } static int property_get_timer_slack_nsec(