sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 0a925debfa747bbb8a4c9ea1dfa8e960fcea8fa6
parent 4025fc5dd660d5c9e4c89be632e26fdfc1adb1ae
Author: sin <sin@2f30.org>
Date:   Fri Nov  6 10:48:52 +0000

env: environ can never be NULL so don't check for it

Diffstat:
env.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/env.c b/env.c @@ -22,8 +22,7 @@ main(int argc, char *argv[]) ARGBEGIN { case 'i': - if (environ) - *environ = NULL; + *environ = NULL; break; case 'u': unsetenv(EARGF(usage())); @@ -42,7 +41,7 @@ main(int argc, char *argv[]) _exit(126 + (savederrno == ENOENT)); } - for (; environ && *environ; environ++) + for (; *environ; environ++) puts(*environ); return fshut(stdout, "<stdout>");