From 6098bf109e3a7e220f1b6e71b86bf43c4612eb27 Mon Sep 17 00:00:00 2001 From: Ray Lai Date: Sun, 7 Jun 2009 13:09:25 +0000 Subject: Don't use $TMPDIR if it is empty. --- usr.bin/sdiff/sdiff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin') 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 . @@ -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]; -- cgit v1.2.3