remove useless if-before-free tests
authorJim Meyering <meyering@gcc.gnu.org>
Wed, 20 Apr 2011 18:19:03 +0000 (18:19 +0000)
committerJim Meyering <meyering@gcc.gnu.org>
Wed, 20 Apr 2011 18:19:03 +0000 (18:19 +0000)
commit046957830e176ad16fdef39bc7f1cd44d8fbc3b7
treee56a024bf4863c42aaa3f941f466a849bb9d3b82
parent53eebfbf949c9cfe6a060a91a09242cb7204f6d8
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
74 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/initialize.c
gcc/c-family/ChangeLog
gcc/c-family/c-format.c
gcc/calls.c
gcc/cfgcleanup.c
gcc/collect2.c
gcc/config/i386/i386.c
gcc/config/mcore/mcore.c
gcc/coverage.c
gcc/cp/ChangeLog
gcc/cp/tree.c
gcc/cse.c
gcc/cselib.c
gcc/df-core.c
gcc/fortran/ChangeLog
gcc/fortran/expr.c
gcc/fortran/gfortranspec.c
gcc/fortran/interface.c
gcc/fortran/trans-openmp.c
gcc/function.c
gcc/gcc.c
gcc/gcov.c
gcc/gensupport.c
gcc/graphite-clast-to-gimple.c
gcc/graphite-sese-to-poly.c
gcc/haifa-sched.c
gcc/ipa-prop.c
gcc/ipa-pure-const.c
gcc/ipa-reference.c
gcc/ira-costs.c
gcc/ira.c
gcc/java/ChangeLog
gcc/java/jcf-parse.c
gcc/matrix-reorg.c
gcc/prefix.c
gcc/profile.c
gcc/reload1.c
gcc/sched-deps.c
gcc/sel-sched-ir.c
gcc/sese.c
gcc/tree-data-ref.c
gcc/tree-eh.c
gcc/tree-ssa-coalesce.c
gcc/tree-ssa-live.c
gcc/tree-ssa-loop-ivopts.c
gcc/tree-ssa-pre.c
libcpp/ChangeLog
libcpp/files.c
libcpp/init.c
libcpp/macro.c
libcpp/pch.c
libdecnumber/ChangeLog
libdecnumber/decNumber.c
libgfortran/ChangeLog
libgfortran/intrinsics/move_alloc.c
libgfortran/io/fbuf.c
libgfortran/io/format.c
libgfortran/io/open.c
libgfortran/io/unit.c
libgfortran/io/unix.c
libiberty/ChangeLog
libiberty/cp-demint.c
libiberty/cplus-dem.c
libiberty/pex-common.c
libiberty/pex-msdos.c
libiberty/pex-win32.c
libiberty/regex.c
libiberty/spaces.c
libstdc++-v3/ChangeLog
libstdc++-v3/libsupc++/del_opnt.cc
lto-plugin/ChangeLog
lto-plugin/lto-plugin.c