Avoid segfault when export is invoked with no arguments. Thanks to
Gennady Feldman.
diff --git a/lash.c b/lash.c
index 28015cb..89325b6 100644
--- a/lash.c
+++ b/lash.c
@@ -426,6 +426,7 @@
for (e = environ; *e; e++) {
printf( "%s\n", *e);
}
+ return 0;
}
res = putenv(v);
if (res)
diff --git a/sh.c b/sh.c
index 28015cb..89325b6 100644
--- a/sh.c
+++ b/sh.c
@@ -426,6 +426,7 @@
for (e = environ; *e; e++) {
printf( "%s\n", *e);
}
+ return 0;
}
res = putenv(v);
if (res)
diff --git a/shell/lash.c b/shell/lash.c
index 28015cb..89325b6 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -426,6 +426,7 @@
for (e = environ; *e; e++) {
printf( "%s\n", *e);
}
+ return 0;
}
res = putenv(v);
if (res)