CVS commit by ossi:
unbelieveable, but close() can actually fail
M +11 -2 sync.c 1.73
--- isync/src/sync.c #1.72:1.73
@@ -37,4 +37,13 @@ static const char *str_ms[] = { "master"
void
+Fclose( FILE *f )
+{
+ if (fclose( f ) == EOF) {
+ perror( "cannot close file" );
+ exit( 1 );
+ }
+}
+
+void
Fprintf( FILE *f, const char *msg, ... )
{
@@ -1169,6 +1178,6 @@ sync_boxes( store_t *ctx[], const char *
}
- fclose( nfp );
- fclose( jfp );
+ Fclose( nfp );
+ Fclose( jfp );
if (!(DFlags & KEEPJOURNAL)) {
/* order is important! */
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel