summaryrefslogtreecommitdiff
path: root/gcc/ipa-reference.c
diff options
context:
space:
mode:
authormeyering <meyering@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-20 18:19:03 +0000
committermeyering <meyering@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-20 18:19:03 +0000
commitdd045aeeddc65c15840ac25e90f729e2805dfc17 (patch)
treee56a024bf4863c42aaa3f941f466a849bb9d3b82 /gcc/ipa-reference.c
parentff3aed6233b16f02b26f82b3dac7d604aac42641 (diff)
downloadgcc-dd045aeeddc65c15840ac25e90f729e2805dfc17.tar.gz
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
Diffstat (limited to 'gcc/ipa-reference.c')
-rw-r--r--gcc/ipa-reference.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c
index f874a2e80ef..40fa6bc1bcb 100644
--- a/gcc/ipa-reference.c
+++ b/gcc/ipa-reference.c
@@ -913,8 +913,7 @@ propagate (void)
node_g->statics_written);
}
}
- if (node_info)
- free (node_info);
+ free (node_info);
if (node->aux)
{
free (node->aux);