util: don't shadow variable
environ is already defined in unistd.h
This commit is contained in:
parent
77209c3505
commit
e706d931e0
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue