summaryrefslogtreecommitdiff
path: root/usr.bin/sdiff
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2006-03-11 07:12:43 +0000
committerRay Lai <ray@cvs.openbsd.org>2006-03-11 07:12:43 +0000
commite0415ec62c3eef7014b05859e64df5bd3077d5b6 (patch)
treea34c2b5c3056e2a4300ec0b2dcb42772ee5dd8ff /usr.bin/sdiff
parentf9ec2206c8fd7beb1cb407c308ea1400f7f39772 (diff)
/tmp -> _PATH_TMP
ok jaredy, otto
Diffstat (limited to 'usr.bin/sdiff')
-rw-r--r--usr.bin/sdiff/common.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/sdiff/common.c b/usr.bin/sdiff/common.c
index 5bb380291fa..b814ccbbad9 100644
--- a/usr.bin/sdiff/common.c
+++ b/usr.bin/sdiff/common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: common.c,v 1.1 2006/02/20 08:38:18 otto Exp $ */
+/* $OpenBSD: common.c,v 1.2 2006/03/11 07:12:42 ray Exp $ */
/*
* Written by Raymond Lai <ray@cyth.net>.
@@ -6,6 +6,7 @@
*/
#include <err.h>
+#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -33,9 +34,9 @@ xmktemp(const char *s)
const char *tmpdir;
char *filename;
- /* If TMPDIR is set, use it; otherwise use /tmp. */
+ /* If TMPDIR is set, use it; otherwise use _PATH_TMP. */
if (!(tmpdir = getenv("TMPDIR")))
- tmpdir = "/tmp";
+ tmpdir = _PATH_TMP;
if (asprintf(&filename, "%s/sdiff.XXXXXXXXXX", tmpdir) == -1)
err(2, "xmktemp");