*: introduce and use xmkstemp. -65 bytes.
Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
This commit is contained in:
parent
cbfeaac7af
commit
6722737ece
7 changed files with 17 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue