* Makefile.in: Add libstub.
[deliverable/binutils-gdb.git] / gprof / cg_arcs.c
index c6431e4b2eda787e603714c5aecd953de694e2df..d14238decc330b439ed0db9685379d94e2d13f01 100644 (file)
@@ -26,9 +26,9 @@
 #include "sym_ids.h"
 
 Sym *cycle_header;
-int num_cycles;
+unsigned int num_cycles;
 Arc **arcs;
-int numarcs;
+unsigned int numarcs;
 
 /*
  * Return TRUE iff PARENT has an arc to covers the address
@@ -67,7 +67,7 @@ void
 DEFUN (arc_add, (parent, child, count),
        Sym * parent AND Sym * child AND int count)
 {
-  static int maxarcs = 0;
+  static unsigned int maxarcs = 0;
   Arc *arc, **newarcs;
 
   DBG (TALLYDEBUG, printf ("[arc_add] %d arcs from %s to %s\n",
@@ -84,6 +84,7 @@ DEFUN (arc_add, (parent, child, count),
       return;
     }
   arc = (Arc *) xmalloc (sizeof (*arc));
+  memset (arc, 0, sizeof (*arc));
   arc->parent = parent;
   arc->child = child;
   arc->count = count;
@@ -106,7 +107,7 @@ DEFUN (arc_add, (parent, child, count),
          newarcs = (Arc **)xmalloc(sizeof (Arc *) * maxarcs);
 
          /* Copy the old array's contents into the new array.  */
-         bcopy (arcs, newarcs, numarcs * sizeof (Arc *));
+         memcpy (newarcs, arcs, numarcs * sizeof (Arc *));
 
          /* Free up the old array.  */
          free (arcs);
@@ -574,10 +575,9 @@ Sym **
 DEFUN_VOID (cg_assemble)
 {
   Sym *parent, **time_sorted_syms, **top_sorted_syms;
-  long index;
+  unsigned int index;
   Arc *arc;
-  extern void find_call PARAMS ((Sym * parent,
-                                bfd_vma p_lowpc, bfd_vma p_highpc));
+
   /*
    * initialize various things:
    *      zero out child times.
This page took 0.026049 seconds and 4 git commands to generate.