]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: strv_env_clean() modifies in-place, no need to set buf to itself
authorMike Yuan <me@yhndnzj.com>
Wed, 28 May 2025 19:05:53 +0000 (21:05 +0200)
committerMike Yuan <me@yhndnzj.com>
Thu, 29 May 2025 19:01:43 +0000 (21:01 +0200)
src/core/exec-invoke.c
src/core/execute.c

index 593c04ae5cb815ed7459b8599905d5d3ef831573..e96a031c86839dc13e5d8b1db6b07c35279455ad 100644 (file)
@@ -5254,7 +5254,7 @@ int exec_invoke(
                 *exit_status = EXIT_MEMORY;
                 return log_oom();
         }
-        accum_env = strv_env_clean(accum_env);
+        strv_env_clean(accum_env);
 
         (void) umask(context->umask);
 
index 8d96109473038cff093e12a5cc617c76824a98d7..2e5303987cb76a9ff5948163d7adcb9780198f98 100644 (file)
@@ -934,7 +934,7 @@ static int exec_context_load_environment(const Unit *unit, const ExecContext *c,
                                         .path = *path,
                                 };
 
-                                p = strv_env_clean_with_callback(p, invalid_env, &info);
+                                strv_env_clean_with_callback(p, invalid_env, &info);
                         }
 
                         if (!v)