aboutsummaryrefslogtreecommitdiff
path: root/printutils
diff options
context:
space:
mode:
authorAlexander Shishkin <virtuoso@slind.org>2010-10-22 13:27:16 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-10-22 13:27:16 +0200
commit6722737ece4b8db3e30b53aef8f981f53db1621e (patch)
tree8e2ddb1d3a43d595ac4584e3d1ef23f49a462bf4 /printutils
parentcbfeaac7afe31323d46c52da3b98a949232d708e (diff)
downloadbusybox-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 'printutils')
-rw-r--r--printutils/lpr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/printutils/lpr.c b/printutils/lpr.c
index fb7860d41..284917926 100644
--- a/printutils/lpr.c
+++ b/printutils/lpr.c
@@ -159,9 +159,7 @@ int lpqr_main(int argc UNUSED_PARAM, char *argv[])
// if data file is stdin, we need to dump it first
if (LONE_DASH(*argv)) {
strcpy(tempfile, "/tmp/lprXXXXXX");
- dfd = mkstemp(tempfile);
- if (dfd < 0)
- bb_perror_msg_and_die("mkstemp");
+ dfd = xmkstemp(tempfile);
bb_copyfd_eof(STDIN_FILENO, dfd);
xlseek(dfd, 0, SEEK_SET);
*argv = (char*)bb_msg_standard_input;