From d26a081cbc4ac38a570a4475fa7f0e0698eb87c0 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Thu, 19 Jun 2014 14:49:30 -0700 Subject: [PATCH] Only get the vpiSysTfCall in getsimtime.c when needed. --- libveriuser/getsimtime.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libveriuser/getsimtime.c b/libveriuser/getsimtime.c index 9b18638fb..0a7ad914f 100644 --- a/libveriuser/getsimtime.c +++ b/libveriuser/getsimtime.c @@ -39,13 +39,14 @@ static ivl_u64_t pow10u(PLI_INT32 val) } static ivl_u64_t -scale(int high, int low, void*obj) { - vpiHandle hand = vpi_handle(vpiScope, vpi_handle(vpiSysTfCall,0)); +scale(int high, int low, void*obj) +{ ivl_u64_t scaled; vpiHandle use_obj = obj; if (use_obj == 0) { /* If object is not passed in, then use current scope. */ + vpiHandle hand = vpi_handle(vpiScope, vpi_handle(vpiSysTfCall,0)); use_obj = hand; } else { /* If object IS passed in, make sure it is a scope. If