From: Christian Göttsche Date: Mon, 23 Dec 2019 22:06:38 +0000 (+0100) Subject: core: unit_label_path(): take const unit X-Git-Tag: v245-rc1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f156e60c66fa23dda076e4a12538fb63ee0daba8;p=thirdparty%2Fsystemd.git core: unit_label_path(): take const unit --- diff --git a/src/core/unit.c b/src/core/unit.c index 3f616e7acf1..279619f039a 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -5803,9 +5803,11 @@ bool unit_needs_console(Unit *u) { return exec_context_may_touch_console(ec); } -const char *unit_label_path(Unit *u) { +const char *unit_label_path(const Unit *u) { const char *p; + assert(u); + /* Returns the file system path to use for MAC access decisions, i.e. the file to read the SELinux label off * when validating access checks. */ diff --git a/src/core/unit.h b/src/core/unit.h index 38d681dfb86..999c7a7d83c 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -842,7 +842,7 @@ int unit_warn_leftover_processes(Unit *u); bool unit_needs_console(Unit *u); -const char *unit_label_path(Unit *u); +const char *unit_label_path(const Unit *u); int unit_pid_attachable(Unit *unit, pid_t pid, sd_bus_error *error);