diff options
Diffstat (limited to 'usr.bin/file/compress.c')
-rw-r--r-- | usr.bin/file/compress.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/usr.bin/file/compress.c b/usr.bin/file/compress.c index a0e04f9ac47..5f576d45f18 100644 --- a/usr.bin/file/compress.c +++ b/usr.bin/file/compress.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compress.c,v 1.14 2009/10/27 23:59:37 deraadt Exp $ */ +/* $OpenBSD: compress.c,v 1.15 2011/01/10 20:59:42 deraadt Exp $ */ /* * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; @@ -235,20 +235,10 @@ file_pipe2file(struct magic_set *ms, int fd, const void *startbuf, int r, tfd; (void)strlcpy(buf, "/tmp/file.XXXXXX", sizeof buf); -#ifndef HAVE_MKSTEMP - { - char *ptr = mktemp(buf); - tfd = open(ptr, O_RDWR|O_TRUNC|O_EXCL|O_CREAT, 0600); - r = errno; - (void)unlink(ptr); - errno = r; - } -#else tfd = mkstemp(buf); r = errno; (void)unlink(buf); errno = r; -#endif if (tfd == -1) { file_error(ms, errno, "cannot create temporary file for pipe copy"); |