func: static void PgstatCollectorMain(int argc,char *argv[]) pgstat_write_statsfile ( ( ( bool ) 1 ) ); static void pgstat_write_statsfile(bool permanent) FILE * fpout ; const char * tmpfile = ( permanent ? "global/pgstat.tmp" : pgstat_stat_tmpname ) ; const char * statfile = ( permanent ? "global/pgstat.stat" : pgstat_stat_filename ) ; fpout = AllocateFile ( tmpfile , "w" ); if ( fpout == ( ( void * ) 0 ) )  if ( ferror ( fpout ) )  if ( FreeFile ( fpout ) < 0 )  if ( rename ( tmpfile , statfile ) < 0 )  unlink ( tmpfile ); 