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/sed.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'editors/sed.c') diff --git a/editors/sed.c b/editors/sed.c index 8d9f7b25b..964d0405e 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -1370,9 +1370,7 @@ int sed_main(int argc UNUSED_PARAM, char **argv) } G.outname = xasprintf("%sXXXXXX", argv[i]); - nonstdoutfd = mkstemp(G.outname); - if (-1 == nonstdoutfd) - bb_perror_msg_and_die("can't create temp file %s", G.outname); + nonstdoutfd = xmkstemp(G.outname); G.nonstdout = xfdopen_for_write(nonstdoutfd); /* Set permissions/owner of output file */ -- cgit v1.2.3