diff options
-rw-r--r-- | src/core/automount.c | 2 | ||||
-rw-r--r-- | src/coredump/coredump.c | 2 | ||||
-rw-r--r-- | src/journal/journald-stream.c | 2 | ||||
-rw-r--r-- | src/locale/keymap-util.c | 3 | ||||
-rw-r--r-- | src/login/logind-dbus.c | 3 | ||||
-rw-r--r-- | src/shared/machine-image.c | 9 |
6 files changed, 8 insertions, 13 deletions
diff --git a/src/core/automount.c b/src/core/automount.c index 8ffdad18c7..f425010cad 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -759,7 +759,7 @@ static void automount_enter_running(Automount *a) { return; } - mkdir_p_label(a->where, a->directory_mode); + (void) mkdir_p_label(a->where, a->directory_mode); /* Before we do anything, let's see if somebody is playing games with us? */ if (lstat(a->where, &st) < 0) { diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index 85e265c218..023701646b 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -369,7 +369,7 @@ static int save_external_coredump( if (r < 0) return log_error_errno(r, "Failed to determine coredump file name: %m"); - mkdir_p_label("/var/lib/systemd/coredump", 0755); + (void) mkdir_p_label("/var/lib/systemd/coredump", 0755); fd = open_tmpfile_linkable(fn, O_RDWR|O_CLOEXEC, &tmp); if (fd < 0) diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c index 137c8f0446..aa2db68634 100644 --- a/src/journal/journald-stream.c +++ b/src/journal/journald-stream.c @@ -159,7 +159,7 @@ static int stdout_stream_save(StdoutStream *s) { return log_oom(); } - mkdir_p("/run/systemd/journal/streams", 0755); + (void) mkdir_p("/run/systemd/journal/streams", 0755); r = fopen_temporary(s->state_file, &f, &temp_path); if (r < 0) diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c index 76d8a4e041..17540089ba 100644 --- a/src/locale/keymap-util.c +++ b/src/locale/keymap-util.c @@ -422,8 +422,7 @@ int x11_write_data(Context *c) { return 0; } - mkdir_p_label("/etc/X11/xorg.conf.d", 0755); - + (void) mkdir_p_label("/etc/X11/xorg.conf.d", 0755); r = fopen_temporary("/etc/X11/xorg.conf.d/00-keyboard.conf", &f, &temp_path); if (r < 0) return r; diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 3ea1823238..e8d40ab185 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -1198,8 +1198,7 @@ static int method_set_user_linger(sd_bus_message *message, void *userdata, sd_bu if (r == 0) return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ - mkdir_p_label("/var/lib/systemd", 0755); - + (void) mkdir_p_label("/var/lib/systemd", 0755); r = mkdir_safe_label("/var/lib/systemd/linger", 0755, 0, 0, MKDIR_WARN_MODE); if (r < 0) return r; diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c index c5a6f2d4ee..458eb98f1d 100644 --- a/src/shared/machine-image.c +++ b/src/shared/machine-image.c @@ -1032,7 +1032,7 @@ int image_path_lock(const char *path, int operation, LockFile *global, LockFile } if (p) { - mkdir_p("/run/systemd/nspawn/locks", 0700); + (void) mkdir_p("/run/systemd/nspawn/locks", 0700); r = make_lock_file(p, operation, global); if (r < 0) { @@ -1169,8 +1169,6 @@ int image_read_metadata(Image *i) { } int image_name_lock(const char *name, int operation, LockFile *ret) { - const char *p; - assert(name); assert(ret); @@ -1187,9 +1185,8 @@ int image_name_lock(const char *name, int operation, LockFile *ret) { if (streq(name, ".host")) return -EBUSY; - mkdir_p("/run/systemd/nspawn/locks", 0700); - p = strjoina("/run/systemd/nspawn/locks/name-", name); - + const char *p = strjoina("/run/systemd/nspawn/locks/name-", name); + (void) mkdir_p("/run/systemd/nspawn/locks", 0700); return make_lock_file(p, operation, ret); } |