diff options
-rw-r--r-- | editors/awk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editors/awk.c b/editors/awk.c index 5a504d034..bc9e99a6f 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -2696,7 +2696,8 @@ int awk_main(int argc, char **argv) | |||
2696 | newfile("/dev/stdout")->F = stdout; | 2696 | newfile("/dev/stdout")->F = stdout; |
2697 | newfile("/dev/stderr")->F = stderr; | 2697 | newfile("/dev/stderr")->F = stderr; |
2698 | 2698 | ||
2699 | for (envp = environ; *envp; envp++) { | 2699 | /* Huh, people report that sometimes environ is NULL. Oh well. */ |
2700 | if (environ) for (envp = environ; *envp; envp++) { | ||
2700 | char *s = xstrdup(*envp); | 2701 | char *s = xstrdup(*envp); |
2701 | char *s1 = strchr(s, '='); | 2702 | char *s1 = strchr(s, '='); |
2702 | if (s1) { | 2703 | if (s1) { |