diff options
author | Alexander Shishkin <virtuoso@slind.org> | 2010-10-22 13:27:16 +0200 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-10-22 13:27:16 +0200 |
commit | 6722737ece4b8db3e30b53aef8f981f53db1621e (patch) | |
tree | 8e2ddb1d3a43d595ac4584e3d1ef23f49a462bf4 /editors/patch.c | |
parent | cbfeaac7afe31323d46c52da3b98a949232d708e (diff) | |
download | busybox-w32-6722737ece4b8db3e30b53aef8f981f53db1621e.tar.gz busybox-w32-6722737ece4b8db3e30b53aef8f981f53db1621e.tar.bz2 busybox-w32-6722737ece4b8db3e30b53aef8f981f53db1621e.zip |
*: introduce and use xmkstemp. -65 bytes.
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'editors/patch.c')
-rw-r--r-- | editors/patch.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/editors/patch.c b/editors/patch.c index fff06907f..33ff8b569 100644 --- a/editors/patch.c +++ b/editors/patch.c | |||
@@ -200,8 +200,7 @@ int copy_tempfile(int fdin, char *name, char **tempname) | |||
200 | int fd; | 200 | int fd; |
201 | 201 | ||
202 | *tempname = xasprintf("%sXXXXXX", name); | 202 | *tempname = xasprintf("%sXXXXXX", name); |
203 | fd = mkstemp(*tempname); | 203 | fd = xmkstemp(*tempname); |
204 | if(-1 == fd) bb_perror_msg_and_die("no temp file"); | ||
205 | 204 | ||
206 | // Set permissions of output file | 205 | // Set permissions of output file |
207 | fstat(fdin, &statbuf); | 206 | fstat(fdin, &statbuf); |