aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1997-03-17 15:55:41 +0000
committerIan Lance Taylor <ian@airs.com>1997-03-17 15:55:41 +0000
commit7dc37d80ff9349a873827e7b07e018ee3da5ef7a (patch)
treeaa9ec85e95f927f712b7e245b2fae1697ed59dfe
parenta77aa7ec4b1a6eb18019cf59731bf1a524b0fea4 (diff)
downloadgdb-7dc37d80ff9349a873827e7b07e018ee3da5ef7a.zip
gdb-7dc37d80ff9349a873827e7b07e018ee3da5ef7a.tar.gz
gdb-7dc37d80ff9349a873827e7b07e018ee3da5ef7a.tar.bz2
Mon Mar 17 10:54:47 1997 David Mosberger-Tang <davidm@azstarnet.com>
* cg_arcs.c (arc_add): memset() newly alloced arc to ensure all fields are initialized with 0.
-rw-r--r--gprof/ChangeLog5
-rw-r--r--gprof/cg_arcs.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gprof/ChangeLog b/gprof/ChangeLog
index 7a9c150..d20bfdc 100644
--- a/gprof/ChangeLog
+++ b/gprof/ChangeLog
@@ -1,3 +1,8 @@
+Mon Mar 17 10:54:47 1997 David Mosberger-Tang <davidm@azstarnet.com>
+
+ * cg_arcs.c (arc_add): memset() newly alloced arc to ensure
+ all fields are initialized with 0.
+
Sat Mar 15 19:17:31 1997 H.J. Lu <hjl@lucon.org>
* symtab.h (find_call): Declare.
diff --git a/gprof/cg_arcs.c b/gprof/cg_arcs.c
index 196e356..f341a8f 100644
--- a/gprof/cg_arcs.c
+++ b/gprof/cg_arcs.c
@@ -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;