summaryrefslogtreecommitdiff
path: root/src/activate
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-20 18:30:31 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-20 19:16:01 -0400
commit23ea3dab15181a3966ec45fa2ccbb81e59d2e0a7 (patch)
treef877e76b89269e16b680cbb619f8476f6710d958 /src/activate
parent131c01dbe9b5f71f8c913d1ebb10c926a47ac6a6 (diff)
activate: avoid warning from -Wshadow
src/activate/activate.c:167:51: warning: declaration shadows a variable in the global scope [-Wshadow] static int launch(char* name, char **argv, char **environ, int fds) { ^ /usr/include/unistd.h:546:15: note: previous declaration is here extern char **environ; ^
Diffstat (limited to 'src/activate')
-rw-r--r--src/activate/activate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/activate/activate.c b/src/activate/activate.c
index be40be48a4..a6e7248574 100644
--- a/src/activate/activate.c
+++ b/src/activate/activate.c
@@ -164,7 +164,7 @@ static int open_sockets(int *epoll_fd, bool accept) {
return count;
}
-static int launch(char* name, char **argv, char **environ, int fds) {
+static int launch(char* name, char **argv, char **env, int fds) {
unsigned n_env = 0, length;
char **envp = NULL, **s;
static const char* tocopy[] = {"TERM=", "PATH=", "USER=", "HOME="};
@@ -182,14 +182,14 @@ static int launch(char* name, char **argv, char **environ, int fds) {
char _cleanup_free_ *p = strappend(*s, "=");
if (!p)
return log_oom();
- envp[n_env] = strv_find_prefix(environ, p);
+ envp[n_env] = strv_find_prefix(env, p);
if (envp[n_env])
n_env ++;
}
}
for (i = 0; i < ELEMENTSOF(tocopy); i++) {
- envp[n_env] = strv_find_prefix(environ, tocopy[i]);
+ envp[n_env] = strv_find_prefix(env, tocopy[i]);
if (envp[n_env])
n_env ++;
}
@@ -208,7 +208,7 @@ static int launch(char* name, char **argv, char **environ, int fds) {
return -errno;
}
-static int launch1(const char* child, char** argv, char **environ, int fd) {
+static int launch1(const char* child, char** argv, char **env, int fd) {
pid_t parent_pid, child_pid;
int r;