Skip to content

Commit

Permalink
core/exec-invoke: drop unnecessary casts
Browse files Browse the repository at this point in the history
Follow-up for c554acd.
  • Loading branch information
yuwata authored and YHNdnzj committed Feb 7, 2025
1 parent aedef65 commit 9eb348c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/exec-invoke.c
Original file line number Diff line number Diff line change
Expand Up @@ -3620,7 +3620,7 @@ static int apply_working_directory(
const ExecParameters *params,
ExecRuntime *runtime,
const char *pwent_home,
const char *const *env) {
char * const *env) {

const char *wd;
int r;
Expand All @@ -3629,7 +3629,7 @@ static int apply_working_directory(

if (context->working_directory_home) {
/* Preferably use the data from $HOME, in case it was updated by a PAM module */
wd = strv_env_get((char**) env, "HOME");
wd = strv_env_get(env, "HOME");
if (!wd) {
/* If that's not available, use the data from the struct passwd entry: */
if (!pwent_home)
Expand Down Expand Up @@ -5511,7 +5511,7 @@ int exec_invoke(
* running this service might have the correct privilege to change to the working directory. Also, it
* is absolutely 💣 crucial 💣 we applied all mount namespacing rearrangements before this, so that
* the cwd cannot be used to pin directories outside of the sandbox. */
r = apply_working_directory(context, params, runtime, pwent_home, (const char* const*) accum_env);
r = apply_working_directory(context, params, runtime, pwent_home, accum_env);
if (r < 0) {
*exit_status = EXIT_CHDIR;
return log_exec_error_errno(context, params, r, "Changing to the requested working directory failed: %m");
Expand Down

0 comments on commit 9eb348c

Please sign in to comment.