diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/apparmor-setup.c | 1 | ||||
-rw-r--r-- | src/core/cgroup.c | 1 | ||||
-rw-r--r-- | src/core/efi-random.c | 11 | ||||
-rw-r--r-- | src/core/execute.c | 1 | ||||
-rw-r--r-- | src/core/timer.c | 2 | ||||
-rw-r--r-- | src/core/unit.c | 1 |
6 files changed, 5 insertions, 12 deletions
diff --git a/src/core/apparmor-setup.c b/src/core/apparmor-setup.c index 304a3e6aac..3426a10358 100644 --- a/src/core/apparmor-setup.c +++ b/src/core/apparmor-setup.c @@ -24,7 +24,6 @@ int mac_apparmor_setup(void) { #if HAVE_APPARMOR _cleanup_(aa_policy_cache_unrefp) aa_policy_cache *policy_cache = NULL; _cleanup_(aa_features_unrefp) aa_features *features = NULL; - const char *current_file; _cleanup_free_ char *current_profile = NULL, *cache_dir_path = NULL; int r; diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 15ab363548..42055e4e41 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -786,7 +786,6 @@ void cgroup_oomd_xattr_apply(Unit *u, const char *cgroup_path) { } static void cgroup_xattr_apply(Unit *u) { - const char *xn; bool b; assert(u); diff --git a/src/core/efi-random.c b/src/core/efi-random.c index a0b89d1379..e8d8ccd117 100644 --- a/src/core/efi-random.c +++ b/src/core/efi-random.c @@ -20,24 +20,23 @@ * is suitably validated. */ static void lock_down_efi_variables(void) { - const char *p; int r; /* Paranoia: let's restrict access modes of these a bit, so that unprivileged users can't use them to * identify the system or gain too much insight into what we might have credited to the entropy * pool. */ - FOREACH_STRING(p, + FOREACH_STRING(path, EFIVAR_PATH(EFI_LOADER_VARIABLE(LoaderRandomSeed)), EFIVAR_PATH(EFI_LOADER_VARIABLE(LoaderSystemToken))) { - r = chattr_path(p, 0, FS_IMMUTABLE_FL, NULL); + r = chattr_path(path, 0, FS_IMMUTABLE_FL, NULL); if (r == -ENOENT) continue; if (r < 0) - log_warning_errno(r, "Failed to drop FS_IMMUTABLE_FL from %s, ignoring: %m", p); + log_warning_errno(r, "Failed to drop FS_IMMUTABLE_FL from %s, ignoring: %m", path); - if (chmod(p, 0600) < 0) - log_warning_errno(errno, "Failed to reduce access mode of %s, ignoring: %m", p); + if (chmod(path, 0600) < 0) + log_warning_errno(errno, "Failed to reduce access mode of %s, ignoring: %m", path); } } diff --git a/src/core/execute.c b/src/core/execute.c index 8652e33923..3cd63846b5 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -3043,7 +3043,6 @@ static int setup_credentials( uid_t uid) { _cleanup_free_ char *p = NULL, *q = NULL; - const char *i; int r; assert(context); diff --git a/src/core/timer.c b/src/core/timer.c index 69a4ea652a..ab107860a7 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -99,8 +99,6 @@ static int timer_add_default_dependencies(Timer *t) { return r; LIST_FOREACH(value, v, t->values) { - const char *target; - if (v->base != TIMER_CALENDAR) continue; diff --git a/src/core/unit.c b/src/core/unit.c index 42fb4220f6..5ab7601ed8 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -4133,7 +4133,6 @@ int unit_patch_contexts(Unit *u) { if ((ec->root_image || !LIST_IS_EMPTY(ec->mount_images)) && (cc->device_policy != CGROUP_DEVICE_POLICY_AUTO || cc->device_allow)) { - const char *p; /* When RootImage= or MountImages= is specified, the following devices are touched. */ FOREACH_STRING(p, "/dev/loop-control", "/dev/mapper/control") { |