mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-28 06:35:34 +07:00
util: don't shadow variable
environ is already defined in unistd.h Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
parent
5bdf5509a0
commit
a0d05ead08
@ -409,7 +409,7 @@ char *truncate_nl(char *s) {
|
||||
return s;
|
||||
}
|
||||
|
||||
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;
|
||||
@ -417,7 +417,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");
|
||||
|
||||
@ -436,7 +436,7 @@ int get_process_environ(pid_t pid, char **environ) {
|
||||
}
|
||||
|
||||
outcome[sz] = '\0';
|
||||
*environ = outcome;
|
||||
*env = outcome;
|
||||
outcome = NULL;
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user