diff options
Diffstat (limited to 'printutils')
-rw-r--r-- | printutils/lpr.c | 4 |
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[]) | |||
159 | // if data file is stdin, we need to dump it first | 159 | // if data file is stdin, we need to dump it first |
160 | if (LONE_DASH(*argv)) { | 160 | if (LONE_DASH(*argv)) { |
161 | strcpy(tempfile, "/tmp/lprXXXXXX"); | 161 | strcpy(tempfile, "/tmp/lprXXXXXX"); |
162 | dfd = mkstemp(tempfile); | 162 | dfd = xmkstemp(tempfile); |
163 | if (dfd < 0) | ||
164 | bb_perror_msg_and_die("mkstemp"); | ||
165 | bb_copyfd_eof(STDIN_FILENO, dfd); | 163 | bb_copyfd_eof(STDIN_FILENO, dfd); |
166 | xlseek(dfd, 0, SEEK_SET); | 164 | xlseek(dfd, 0, SEEK_SET); |
167 | *argv = (char*)bb_msg_standard_input; | 165 | *argv = (char*)bb_msg_standard_input; |