remove useless if-before-free tests

Change "if (E) free (E);" to "free (E);" everywhere except in the
libgo/, intl/, zlib/ and classpath/ directories.
Also transform equivalent variants like
"if (E != NULL) free (E);" and allow an extra cast on the
argument to free.  Otherwise, the tested and freed "E"
expressions must be identical, modulo white space.

From-SVN: r172785
This commit is contained in:
Jim Meyering
2011-04-20 18:19:03 +00:00
parent 53eebfbf94
commit 046957830e
74 changed files with 267 additions and 270 deletions

View File

@@ -259,8 +259,7 @@ cpp_destroy (cpp_reader *pfile)
while (CPP_BUFFER (pfile) != NULL)
_cpp_pop_buffer (pfile);
if (pfile->out.base)
free (pfile->out.base);
free (pfile->out.base);
if (pfile->macro_buffer)
{