widl: Fixed fwrite error handling.
This commit is contained in:
parent
da0f33370a
commit
430c3d0be2
|
@ -266,7 +266,7 @@ void write_regscript( const statement_list_t *stmts )
|
||||||
{
|
{
|
||||||
FILE *f = fopen( regscript_name, "w" );
|
FILE *f = fopen( regscript_name, "w" );
|
||||||
if (!f) error( "Could not open %s for output\n", regscript_name );
|
if (!f) error( "Could not open %s for output\n", regscript_name );
|
||||||
if (fwrite( output_buffer, output_buffer_pos, 1, f ) != output_buffer_pos)
|
if (fwrite( output_buffer, 1, output_buffer_pos, f ) != output_buffer_pos)
|
||||||
error( "Failed to write to %s\n", regscript_name );
|
error( "Failed to write to %s\n", regscript_name );
|
||||||
if (fclose( f ))
|
if (fclose( f ))
|
||||||
error( "Failed to write to %s\n", regscript_name );
|
error( "Failed to write to %s\n", regscript_name );
|
||||||
|
|
Loading…
Reference in New Issue