summaryrefslogtreecommitdiffstats
path: root/usr.bin/pr/pr.c
diff options
context:
space:
mode:
authorjedgar <jedgar@FreeBSD.org>2002-02-17 20:53:56 +0000
committerjedgar <jedgar@FreeBSD.org>2002-02-17 20:53:56 +0000
commitc83f3ada88d82cfb8651426eeee61e2f199cfbba (patch)
tree3deb3ee5c3d107166ebbcd0600b9d68eb2fc26ce /usr.bin/pr/pr.c
parentac1df75e690cf072c73cd9253f92081e08d2a099 (diff)
downloadFreeBSD-src-c83f3ada88d82cfb8651426eeee61e2f199cfbba.zip
FreeBSD-src-c83f3ada88d82cfb8651426eeee61e2f199cfbba.tar.gz
Ensure err is a useful value to prevent using fputs() with a NULL stream.
MFC after: 1 week
Diffstat (limited to 'usr.bin/pr/pr.c')
-rw-r--r--usr.bin/pr/pr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/pr/pr.c b/usr.bin/pr/pr.c
index 2e0376e..941b8fe 100644
--- a/usr.bin/pr/pr.c
+++ b/usr.bin/pr/pr.c
@@ -1590,6 +1590,7 @@ setup(argc, argv)
* defer diagnostics until processing is done
*/
if ((err = tmpfile()) == NULL) {
+ err = stderr;
(void)fputs("Cannot defer diagnostic messages\n",stderr);
return(1);
}
OpenPOWER on IntegriCloud