aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@gcc.gnu.org>2011-04-20 18:19:03 +0000
committerJim Meyering <meyering@gcc.gnu.org>2011-04-20 18:19:03 +0000
commit046957830e176ad16fdef39bc7f1cd44d8fbc3b7 (patch)
treee56a024bf4863c42aaa3f941f466a849bb9d3b82 /gcc/cse.c
parent53eebfbf949c9cfe6a060a91a09242cb7204f6d8 (diff)
downloadgcc-046957830e176ad16fdef39bc7f1cd44d8fbc3b7.zip
gcc-046957830e176ad16fdef39bc7f1cd44d8fbc3b7.tar.gz
gcc-046957830e176ad16fdef39bc7f1cd44d8fbc3b7.tar.bz2
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
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index f7b477c..d83b38a 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -796,8 +796,7 @@ init_cse_reg_info (unsigned int nregs)
}
/* Reallocate the table with NEW_SIZE entries. */
- if (cse_reg_info_table)
- free (cse_reg_info_table);
+ free (cse_reg_info_table);
cse_reg_info_table = XNEWVEC (struct cse_reg_info, new_size);
cse_reg_info_table_size = new_size;
cse_reg_info_table_first_uninitialized = 0;
@@ -6975,8 +6974,7 @@ delete_trivially_dead_insns (rtx insns, int nreg)
df_insn_rescan (insn);
}
}
- if (replacements)
- free (replacements);
+ free (replacements);
}
if (dump_file && ndead)