chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77209c3
)
util: don't shadow variable
author
Thomas Hindoe Paaboel Andersen
<phomes@gmail.com>
Sat, 29 Nov 2014 23:37:16 +0000
(
00:37
+0100)
committer
Thomas Hindoe Paaboel Andersen
<phomes@gmail.com>
Wed, 3 Dec 2014 22:51:51 +0000
(23:51 +0100)
environ is already defined in unistd.h
src/shared/util.c
patch
|
blob
|
history
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);
}
-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;
@@
-963,7
+963,7
@@
int get_process_environ(pid_t pid, char **environ) {
size_t allocated = 0, sz = 0;
assert(pid >= 0);
- assert(env
iron
);
+ assert(env);
p = procfs_file_alloca(pid, "environ");
@@
-982,7
+982,7
@@
int get_process_environ(pid_t pid, char **environ) {
}
outcome[sz] = '\0';
- *env
iron
= outcome;
+ *env = outcome;
outcome = NULL;
return 0;