From 6722737ece4b8db3e30b53aef8f981f53db1621e Mon Sep 17 00:00:00 2001 From: Alexander Shishkin Date: Fri, 22 Oct 2010 13:27:16 +0200 Subject: *: introduce and use xmkstemp. -65 bytes. Signed-off-by: Alexander Shishkin Signed-off-by: Denys Vlasenko --- editors/patch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'editors/patch.c') 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) int fd; *tempname = xasprintf("%sXXXXXX", name); - fd = mkstemp(*tempname); - if(-1 == fd) bb_perror_msg_and_die("no temp file"); + fd = xmkstemp(*tempname); // Set permissions of output file fstat(fdin, &statbuf); -- cgit v1.2.3