This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] tree-ssa-dom.c: Replace xcalloc with xmalloc.


Hi,

Attached is a patch to replace xcalloc with xmalloc.

COPY is fully initialized immediately after the call to xcalloc, so we
can call xmalloc here.

Tested on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2005-05-17  Kazu Hirata  <kazu@cs.umass.edu>

	* tree-ssa-dom.c (thread_across_edge): Use xmalloc instead of
	xcalloc.

Index: tree-ssa-dom.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-dom.c,v
retrieving revision 2.110
diff -u -d -p -r2.110 tree-ssa-dom.c
--- tree-ssa-dom.c	10 May 2005 20:21:27 -0000	2.110
+++ tree-ssa-dom.c	16 May 2005 18:32:14 -0000
@@ -681,7 +681,7 @@ thread_across_edge (struct dom_walk_data
 	  unsigned int num, i = 0;
 
 	  num = NUM_SSA_OPERANDS (stmt, (SSA_OP_USE | SSA_OP_VUSE));
-	  copy = xcalloc (num, sizeof (tree));
+	  copy = xmalloc (num * sizeof (tree));
 
 	  /* Make a copy of the uses & vuses into USES_COPY, then cprop into
 	     the operands.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]