Avoid segfault when export is invoked with no arguments. Thanks to

Gennady Feldman.
This commit is contained in:
Matt Kraai 2001-04-04 17:50:04 +00:00
parent 3f98040554
commit 2129f97cd9
3 changed files with 3 additions and 0 deletions

1
lash.c
View File

@ -426,6 +426,7 @@ static int builtin_export(struct child_prog *child)
for (e = environ; *e; e++) {
printf( "%s\n", *e);
}
return 0;
}
res = putenv(v);
if (res)

1
sh.c
View File

@ -426,6 +426,7 @@ static int builtin_export(struct child_prog *child)
for (e = environ; *e; e++) {
printf( "%s\n", *e);
}
return 0;
}
res = putenv(v);
if (res)

View File

@ -426,6 +426,7 @@ static int builtin_export(struct child_prog *child)
for (e = environ; *e; e++) {
printf( "%s\n", *e);
}
return 0;
}
res = putenv(v);
if (res)