diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-04-14 21:43:49 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-04-14 21:43:49 -0400 |
commit | b172dc8b58a5db37d61cb4718cd42628126710f1 (patch) | |
tree | b96afb64c9cbd7e9386cecd2979cfc07d578baca | |
parent | 9b96220e5a9d1648c84060357ebe473e2afbe45c (diff) | |
download | musl-b172dc8b58a5db37d61cb4718cd42628126710f1.tar.gz |
make tmpfile slightly more efficient (use unlink syscall instead of remove)
-rw-r--r-- | src/stdio/tmpfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/tmpfile.c b/src/stdio/tmpfile.c index a6b72236..18c232f7 100644 --- 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; } } |