aboutsummaryrefslogtreecommitdiff
path: root/printutils
diff options
context:
space:
mode:
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;