aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--environ.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/environ.c b/environ.c
index de560896..101dfafd 100644
--- a/environ.c
+++ b/environ.c
@@ -196,10 +196,10 @@ void
environ_push(struct environ *env)
{
struct environ_entry *envent;
- char **vp, *v;
+ char *v;
- for (vp = environ; *vp != NULL; vp++) {
- v = xstrdup(*vp);
+ while (*environ != NULL) {
+ v = xstrdup(*environ);
v[strcspn(v, "=")] = '\0';
unsetenv(v);