diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2009-06-07 13:09:25 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2009-06-07 13:09:25 +0000 |
commit | 6098bf109e3a7e220f1b6e71b86bf43c4612eb27 (patch) | |
tree | 11603d0b518e744cc3a6cfb9b3bb37b4b2f7b335 | |
parent | 2438d98eab6d696469de2c554d7d320c0ea92d2f (diff) |
Don't use $TMPDIR if it is empty.
-rw-r--r-- | usr.bin/sdiff/sdiff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sdiff/sdiff.c b/usr.bin/sdiff/sdiff.c index f5537210c50..1d4cf163d5d 100644 --- a/usr.bin/sdiff/sdiff.c +++ b/usr.bin/sdiff/sdiff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdiff.c,v 1.25 2009/06/07 13:06:02 ray Exp $ */ +/* $OpenBSD: sdiff.c,v 1.26 2009/06/07 13:09:24 ray Exp $ */ /* * Written by Raymond Lai <ray@cyth.net>. @@ -250,7 +250,7 @@ main(int argc, char **argv) if (argc != 2) usage(); - if ((tmpdir = getenv("TMPDIR")) == NULL) + if ((tmpdir = getenv("TMPDIR")) == NULL || *tmpdir == '\0') tmpdir = _PATH_TMP; filename1 = argv[0]; |