chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: don't shadow variable
[elogind.git]
/
src
/
shared
/
util.c
diff --git
a/src/shared/util.c
b/src/shared/util.c
index 4fcbab97bed67eefaeea956708d5cc2d9f916abe..f01cdd7451f9d70f8f13a4e6c4a7229a2bbd692b 100644
(file)
--- 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);
}
return get_process_link_contents(p, root);
}
-int get_process_environ(pid_t pid, char **env
iron
) {
+int get_process_environ(pid_t pid, char **env) {
_cleanup_fclose_ FILE *f = NULL;
_cleanup_free_ char *outcome = NULL;
int c;
_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);
size_t allocated = 0, sz = 0;
assert(pid >= 0);
- assert(env
iron
);
+ assert(env);
p = procfs_file_alloca(pid, "environ");
p = procfs_file_alloca(pid, "environ");
@@
-982,7
+982,7
@@
int get_process_environ(pid_t pid, char **environ) {
}
outcome[sz] = '\0';
}
outcome[sz] = '\0';
- *env
iron
= outcome;
+ *env = outcome;
outcome = NULL;
return 0;
outcome = NULL;
return 0;