summaryrefslogtreecommitdiff
path: root/gcc/sched-deps.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/sched-deps.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/sched-deps.c')
-rw-r--r--gcc/sched-deps.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index 6abef8b9f4d..09bf65d9093 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -3547,8 +3547,7 @@ free_deps (struct deps_desc *deps)
/* As we initialize reg_last lazily, it is possible that we didn't allocate
it at all. */
- if (deps->reg_last)
- free (deps->reg_last);
+ free (deps->reg_last);
deps->reg_last = NULL;
deps = NULL;