From 94bd732348535de399f8f003e3a1cbc8a81ab839 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Sun, 31 Jan 2016 13:26:09 +0000 Subject: core: refactoring: add job_type_to_access_method remove duplication --- src/core/dbus-unit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/dbus-unit.c') diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index 9862f6e6f6..7c7b50b99b 100644 --- a/src/core/dbus-unit.c +++ b/src/core/dbus-unit.c @@ -460,8 +460,8 @@ int bus_unit_method_start_generic( r = mac_selinux_unit_access_check( u, message, - (job_type == JOB_START || job_type == JOB_RESTART || job_type == JOB_TRY_RESTART) ? "start" : - job_type == JOB_STOP ? "stop" : "reload", error); + job_type_to_access_method(job_type), + error); if (r < 0) return r; @@ -995,8 +995,8 @@ int bus_unit_queue_job( r = mac_selinux_unit_access_check( u, message, - (type == JOB_START || type == JOB_RESTART || type == JOB_TRY_RESTART) ? "start" : - type == JOB_STOP ? "stop" : "reload", error); + job_type_to_access_method(type), + error); if (r < 0) return r; -- cgit v1.2.3-54-g00ecf