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 --- printutils/lpr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'printutils') diff --git a/printutils/lpr.c b/printutils/lpr.c index fb7860d..2849179 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; -- cgit v1.1