sbase

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

commit 1b32732887b575a553cdbe07555ab9526a716e00
parent 75b848bb09df4b2080317a812e76ed37dc84c5be
Author: sin <sin@2f30.org>
Date:   Fri,  6 Nov 2015 10:48:52 +0000

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

Diffstat:
Menv.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>");