OSDN Git Service

remove useless if-before-free tests
authormeyering <meyering@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Apr 2011 18:19:03 +0000 (18:19 +0000)
committermeyering <meyering@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Apr 2011 18:19:03 +0000 (18:19 +0000)
commitdd045aeeddc65c15840ac25e90f729e2805dfc17
treee56a024bf4863c42aaa3f941f466a849bb9d3b82
parentff3aed6233b16f02b26f82b3dac7d604aac42641
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172785 138bc75d-0d04-0410-961f-82ee72b054a4
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