summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorray <ray@openbsd.org>2006-03-11 07:12:42 +0000
committerray <ray@openbsd.org>2006-03-11 07:12:42 +0000
commit46e257f3c5ec6b2139ce2a69dc2d29e562362a16 (patch)
tree7f186c1c3984e122fd5c8c5c3a8dc4af90014f2d
parentFixes the `optindx' might be used uninitialized in this function (diff)
downloadwireguard-openbsd-46e257f3c5ec6b2139ce2a69dc2d29e562362a16.tar.xz
wireguard-openbsd-46e257f3c5ec6b2139ce2a69dc2d29e562362a16.zip
/tmp -> _PATH_TMP
ok jaredy, otto
-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");