summaryrefslogtreecommitdiffstats
path: root/src/systemctl
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-07-12 16:39:07 +0200
committerLennart Poettering <lennart@poettering.net>2019-07-12 16:40:10 +0200
commit2caa38e99f76788eb5bd84cbdef72c5e3912dd4b (patch)
tree949307e679986ec78f9543bc8dc95961e0c8329a /src/systemctl
parentutil-lib: [static] array argument sizes are apparently not OK for NULL parame... (diff)
downloadsystemd-2caa38e99f76788eb5bd84cbdef72c5e3912dd4b.tar.xz
systemd-2caa38e99f76788eb5bd84cbdef72c5e3912dd4b.zip
tree-wide: some more [static] related fixes
let's add [static] where it was missing so far Drop [static] on parameters that can be NULL. Add an assert() around parameters that have [static] and can't be NULL hence. Add some "const" where it was forgotten.
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 6490fe6f0d..52e3416cab 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -3021,6 +3021,8 @@ static enum action verb_to_action(const char *verb) {
static const char** make_extra_args(const char *extra_args[static 4]) {
size_t n = 0;
+ assert(extra_args);
+
if (arg_scope != UNIT_FILE_SYSTEM)
extra_args[n++] = "--user";