diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-11-30 00:37:16 +0100 |
---|---|---|
committer | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-12-03 23:51:51 +0100 |
commit | e706d931e0f5741d57c6f3752b4e3520f90f47d5 (patch) | |
tree | c32b3c683b9167f2fd21c570c80efc2cf272fb27 /src/shared | |
parent | 77209c3505fa856dae23ae566b729c862a9b71f4 (diff) |
util: don't shadow variable
environ is already defined in unistd.h
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 4fcbab97be..f01cdd7451 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -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; |