From f497dbf01e7e83b27e16bab564a7f3a71d7c148b Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Sat, 14 Jun 2008 15:31:48 -0700 Subject: [PATCH] Created too mane vvp_net_t objects? The functor_ref_lookup() function fills its argument in with the vvp_net_t* pointer that matches the var name, so there is no need to create the vvp_net_t object before then. --- vvp/vpi_signal.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vvp/vpi_signal.cc b/vvp/vpi_signal.cc index 8d53076d6..1796fad5d 100644 --- a/vvp/vpi_signal.cc +++ b/vvp/vpi_signal.cc @@ -1164,7 +1164,7 @@ vpiHandle vpip_make_PV(char*var, int base, int width) obj->tbase = base; obj->twid = 0; obj->width = (unsigned) width; - obj->net = (vvp_net_t*) malloc(sizeof(vvp_net_t)); + obj->net = 0; functor_ref_lookup(&obj->net, var); return &obj->base; @@ -1179,7 +1179,7 @@ vpiHandle vpip_make_PV(char*var, char*symbol, int width) obj->tbase = 0; obj->twid = 0; obj->width = (unsigned) width; - obj->net = (vvp_net_t*) malloc(sizeof(vvp_net_t)); + obj->net = 0; functor_ref_lookup(&obj->net, var); return &obj->base; @@ -1194,7 +1194,7 @@ vpiHandle vpip_make_PV(char*var, int tbase, int twid, int width) obj->tbase = tbase; obj->twid = (unsigned) twid; obj->width = (unsigned) width; - obj->net = (vvp_net_t*) malloc(sizeof(vvp_net_t)); + obj->net = 0; functor_ref_lookup(&obj->net, var); return &obj->base;