File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
- /* $NetBSD: save.c,v 1.6 1999/07/16 01:38:20 hubertf Exp $ */
1
+ /* $NetBSD: save.c,v 1.7 1999/07/17 20:02:48 hubertf Exp $ */
2
2
3
3
/*-
4
4
* Copyright (c) 1991, 1993
43
43
#if 0
44
44
static char sccsid [] = "@(#)save.c 8.1 (Berkeley) 5/31/93" ;
45
45
#else
46
- __RCSID ("$NetBSD: save.c,v 1.6 1999/07/16 01:38:20 hubertf Exp $" );
46
+ __RCSID ("$NetBSD: save.c,v 1.7 1999/07/17 20:02:48 hubertf Exp $" );
47
47
#endif
48
48
#endif /* not lint */
49
49
50
+ #include <err.h>
50
51
#include <stdio.h>
51
52
#include <stdlib.h>
52
53
#include "hdr.h"
@@ -152,7 +153,10 @@ save(outfile) /* Two passes on data: first to get checksum,
152
153
* s = (* s ^ random ()) & 0xFF ; /* Lightly encrypt */
153
154
fwrite (p -> address , p -> width , 1 , out );
154
155
}
155
- fclose (out );
156
+ if (fclose (out ) != 0 ) {
157
+ warn ("writing %s" , outfile );
158
+ return 1 ;
159
+ }
156
160
return 0 ;
157
161
}
158
162
You can’t perform that action at this time.
0 commit comments