projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b96220
)
make tmpfile slightly more efficient (use unlink syscall instead of remove)
author
Rich Felker
<dalias@aerifal.cx>
Fri, 15 Apr 2011 01:43:49 +0000
(21:43 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Fri, 15 Apr 2011 01:43:49 +0000
(21:43 -0400)
src/stdio/tmpfile.c
patch
|
blob
|
history
diff --git
a/src/stdio/tmpfile.c
b/src/stdio/tmpfile.c
index a6b72236d2463d8edbcd8b1ef5d24ea030818307..18c232f7615d5e31463d367df29f01f40590fc93 100644
(file)
--- a/
src/stdio/tmpfile.c
+++ b/
src/stdio/tmpfile.c
@@
-17,7
+17,7
@@
FILE *tmpfile(void)
fd = syscall(SYS_open, s, O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600);
if (fd >= 0) {
f = __fdopen(fd, "w+");
-
remove(
s);
+
syscall(SYS_unlink,
s);
return f;
}
}