summaryrefslogtreecommitdiff
path: root/editors/diff.c
diff options
context:
space:
mode:
authorAlexander Shishkin2010-10-22 13:27:16 +0200
committerDenys Vlasenko2010-10-22 13:27:16 +0200
commit6722737ece4b8db3e30b53aef8f981f53db1621e (patch)
tree8e2ddb1d3a43d595ac4584e3d1ef23f49a462bf4 /editors/diff.c
parentcbfeaac7afe31323d46c52da3b98a949232d708e (diff)
downloadbusybox-6722737ece4b8db3e30b53aef8f981f53db1621e.zip
busybox-6722737ece4b8db3e30b53aef8f981f53db1621e.tar.gz
*: 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/diff.c')
-rw-r--r--editors/diff.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/editors/diff.c b/editors/diff.c
index 83de527..d9d709d 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -685,9 +685,8 @@ static int diffreg(char *file[2])
*/
if (lseek(fd, 0, SEEK_SET) == -1 && errno == ESPIPE) {
char name[] = "/tmp/difXXXXXX";
- int fd_tmp = mkstemp(name);
- if (fd_tmp < 0)
- bb_perror_msg_and_die("mkstemp");
+ int fd_tmp = xmkstemp(name);
+
unlink(name);
if (bb_copyfd_eof(fd, fd_tmp) < 0)
xfunc_die();