Michael Stefaniuc : wpp: Remove redundant NULL check before free(). Found by Smatch.
Alexandre Julliard
julliard at winehq.org
Mon Oct 22 09:55:22 CDT 2007
Module: wine
Branch: master
Commit: cc4b9656b909baf8cb51515d594ad08a2a3fb709
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cc4b9656b909baf8cb51515d594ad08a2a3fb709
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Sun Oct 21 01:14:06 2007 +0200
wpp: Remove redundant NULL check before free(). Found by Smatch.
---
libs/wpp/ppy.y | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libs/wpp/ppy.y b/libs/wpp/ppy.y
index 3209ee2..fc94bb5 100644
--- a/libs/wpp/ppy.y
+++ b/libs/wpp/ppy.y
@@ -282,10 +282,10 @@ preprocessor
| tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tSINT tNL
{ fprintf(ppy_out, "# %d %s %d %d %d %d\n", $2 ,$3 ,$4 ,$5, $6, $7); free($3); }
| tGCCLINE tNL /* The null-token */
- | tERROR opt_text tNL { ppy_error("#error directive: '%s'", $2); if($2) free($2); }
- | tWARNING opt_text tNL { ppy_warning("#warning directive: '%s'", $2); if($2) free($2); }
- | tPRAGMA opt_text tNL { fprintf(ppy_out, "#pragma %s\n", $2 ? $2 : ""); if ($2) free($2); }
- | tPPIDENT opt_text tNL { if(pp_status.pedantic) ppy_warning("#ident ignored (arg: '%s')", $2); if($2) free($2); }
+ | tERROR opt_text tNL { ppy_error("#error directive: '%s'", $2); free($2); }
+ | tWARNING opt_text tNL { ppy_warning("#warning directive: '%s'", $2); free($2); }
+ | tPRAGMA opt_text tNL { fprintf(ppy_out, "#pragma %s\n", $2 ? $2 : ""); free($2); }
+ | tPPIDENT opt_text tNL { if(pp_status.pedantic) ppy_warning("#ident ignored (arg: '%s')", $2); free($2); }
| tRCINCLUDE tRCINCLUDEPATH {
int nl=strlen($2) +3;
char *fn=pp_xmalloc(nl);
More information about the wine-cvs
mailing list