From 7dc37d80ff9349a873827e7b07e018ee3da5ef7a Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 17 Mar 1997 15:55:41 +0000 Subject: Mon Mar 17 10:54:47 1997 David Mosberger-Tang * cg_arcs.c (arc_add): memset() newly alloced arc to ensure all fields are initialized with 0. --- gprof/ChangeLog | 5 +++++ gprof/cg_arcs.c | 1 + 2 files changed, 6 insertions(+) (limited to 'gprof') 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 + + * 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 * 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; -- cgit v1.1