summaryrefslogtreecommitdiffstats
path: root/adventure
diff options
context:
space:
mode:
authorhubertf <hubertf@NetBSD.org>1999-07-14 17:21:03 +0000
committerhubertf <hubertf@NetBSD.org>1999-07-14 17:21:03 +0000
commitd1b7ca1371db78422c0683528ce97f1302056524 (patch)
treed582fd2770034433cf8f4d11ec1ef4a8c3d279e2 /adventure
parentaca0b505ddf5eb11e914c59b17d0e5aeb8c2a0ce (diff)
downloadbsdgames-darwin-d1b7ca1371db78422c0683528ce97f1302056524.tar.gz
bsdgames-darwin-d1b7ca1371db78422c0683528ce97f1302056524.tar.zst
bsdgames-darwin-d1b7ca1371db78422c0683528ce97f1302056524.zip
From PR 7985 by Joseph Myers <jsm28@cam.ac.uk>:
games/adventure/setup.c fails to check for errors when writing its output. This means that, if the disk fills up at this point during a build, it would nevertheless fail to return an error status.
Diffstat (limited to 'adventure')
-rw-r--r--adventure/setup.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/adventure/setup.c b/adventure/setup.c
index 89c3100a..8851b074 100644
--- a/adventure/setup.c
+++ b/adventure/setup.c
@@ -1,4 +1,4 @@
-/* $NetBSD: setup.c,v 1.6 1999/02/10 00:29:21 hubertf Exp $ */
+/* $NetBSD: setup.c,v 1.7 1999/07/14 17:21:03 hubertf Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
#if 0
static char sccsid[] = "@(#)setup.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: setup.c,v 1.6 1999/02/10 00:29:21 hubertf Exp $");
+__RCSID("$NetBSD: setup.c,v 1.7 1999/07/14 17:21:03 hubertf Exp $");
#endif
#endif /* not lint */
@@ -121,5 +121,8 @@ main(argc, argv)
}
puts("\n\t0\n};");
fclose(infile);
+ fflush(stdout);
+ if (ferror(stdout))
+ err(1, "writing standard output");
exit(0);
}