diff options
author | jsm <jsm@NetBSD.org> | 1999-09-10 00:18:20 +0000 |
---|---|---|
committer | jsm <jsm@NetBSD.org> | 1999-09-10 00:18:20 +0000 |
commit | b9e9a125627944dbfaacf50922e58f4900e9c567 (patch) | |
tree | a8357b35169078e664f1e5fd90266ef0a0e662d0 /fortune/strfile/strfile.c | |
parent | 517497ea9683bb0c3bb9a38d4b7930b325c9db03 (diff) | |
download | bsdgames-darwin-b9e9a125627944dbfaacf50922e58f4900e9c567.tar.gz bsdgames-darwin-b9e9a125627944dbfaacf50922e58f4900e9c567.tar.zst bsdgames-darwin-b9e9a125627944dbfaacf50922e58f4900e9c567.zip |
Check for write errors in auxiliary programs used during build of games.
Diffstat (limited to 'fortune/strfile/strfile.c')
-rw-r--r-- | fortune/strfile/strfile.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fortune/strfile/strfile.c b/fortune/strfile/strfile.c index 0d74f4e2..5c8954e1 100644 --- a/fortune/strfile/strfile.c +++ b/fortune/strfile/strfile.c @@ -1,4 +1,4 @@ -/* $NetBSD: strfile.c,v 1.12 1999/09/09 17:30:19 jsm Exp $ */ +/* $NetBSD: strfile.c,v 1.13 1999/09/10 00:18:21 jsm Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\ #if 0 static char sccsid[] = "@(#)strfile.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: strfile.c,v 1.12 1999/09/09 17:30:19 jsm Exp $"); +__RCSID("$NetBSD: strfile.c,v 1.13 1999/09/10 00:18:21 jsm Exp $"); #endif #endif /* not lint */ @@ -256,6 +256,9 @@ main(ac, av) HTOBE64(*p); (void) fwrite((char *) Seekpts, sizeof *Seekpts, (int) Num_pts, outf); } + fflush(outf); + if (ferror(outf)) + err(1, "fwrite %s", Outfile); (void) fclose(outf); exit(0); } |