Marcus Meissner : winebuild: Avoid a superflous null check (Coverity).
Alexandre Julliard
julliard at winehq.org
Tue Jun 14 11:57:47 CDT 2011
Module: wine
Branch: master
Commit: 0806f9a438f752ee88e07cad7c97c69ea9d1af2c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0806f9a438f752ee88e07cad7c97c69ea9d1af2c
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Tue Jun 14 13:36:04 2011 +0200
winebuild: Avoid a superflous null check (Coverity).
---
tools/winebuild/res32.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/tools/winebuild/res32.c b/tools/winebuild/res32.c
index 0c2bd09..e3f46ee 100644
--- a/tools/winebuild/res32.c
+++ b/tools/winebuild/res32.c
@@ -626,6 +626,7 @@ void output_res_o_file( DLLSPEC *spec )
unsigned int i;
char *res_file = NULL;
int fd;
+ struct strarray *args;
if (!spec->nb_resources) fatal_error( "--resources mode needs at least one resource file as input\n" );
if (!output_file_name) fatal_error( "No output file name specified\n" );
@@ -681,12 +682,10 @@ void output_res_o_file( DLLSPEC *spec )
close( fd );
free( output_buffer );
- if (res_file)
- {
- struct strarray *args = strarray_init();
- strarray_add( args, find_tool( "windres", NULL ), "-i", res_file, "-o", output_file_name, NULL );
- spawn( args );
- strarray_free( args );
- }
+ args = strarray_init();
+ strarray_add( args, find_tool( "windres", NULL ), "-i", res_file, "-o", output_file_name, NULL );
+ spawn( args );
+ strarray_free( args );
+
output_file_name = NULL; /* so we don't try to assemble it */
}
More information about the wine-cvs
mailing list