*: introduce and use xmkstemp. -65 bytes.
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
diff --git a/editors/sed.c b/editors/sed.c
index 8d9f7b2..964d040 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -1370,9 +1370,7 @@
}
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 */