mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-03 23:38:39 +00:00
util: don't shadow variable
environ is already defined in unistd.h
This commit is contained in:
+3
-3
@@ -955,7 +955,7 @@ int get_process_root(pid_t pid, char **root) {
|
||||
return get_process_link_contents(p, root);
|
||||
}
|
||||
|
||||
int get_process_environ(pid_t pid, char **environ) {
|
||||
int get_process_environ(pid_t pid, char **env) {
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
_cleanup_free_ char *outcome = NULL;
|
||||
int c;
|
||||
@@ -963,7 +963,7 @@ int get_process_environ(pid_t pid, char **environ) {
|
||||
size_t allocated = 0, sz = 0;
|
||||
|
||||
assert(pid >= 0);
|
||||
assert(environ);
|
||||
assert(env);
|
||||
|
||||
p = procfs_file_alloca(pid, "environ");
|
||||
|
||||
@@ -982,7 +982,7 @@ int get_process_environ(pid_t pid, char **environ) {
|
||||
}
|
||||
|
||||
outcome[sz] = '\0';
|
||||
*environ = outcome;
|
||||
*env = outcome;
|
||||
outcome = NULL;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user