diff --git a/vpi/lxt2_write.c b/vpi/lxt2_write.c index 80f2f6503..695ad2854 100644 --- a/vpi/lxt2_write.c +++ b/vpi/lxt2_write.c @@ -728,7 +728,7 @@ if((lt)&&(lt->numfacs)) lt->numfacs = facs_encountered; /* don't process alias value changes ever */ } - if(aliascache) free(aliascache); + free(aliascache); } } @@ -2150,8 +2150,8 @@ if(lt) while(s) { - if(s->name) { free(s->name); } - if(s->value) { free(s->value); } + free(s->name); + free(s->value); s2=s->symchain; free(s); s=s2; @@ -2181,8 +2181,11 @@ if(lt) } /* - * $Id: lxt2_write.c,v 1.2 2008/12/20 05:08:26 gtkwave Exp $ + * $Id: lxt2_write.c,v 1.3 2010/05/03 20:11:03 gtkwave Exp $ * $Log: lxt2_write.c,v $ + * Revision 1.3 2010/05/03 20:11:03 gtkwave + * cppcheck warning fixes + * * Revision 1.2 2008/12/20 05:08:26 gtkwave * -Wshadow warning cleanups * diff --git a/vpi/lxt_write.c b/vpi/lxt_write.c index a1eab56d5..e37640b89 100644 --- a/vpi/lxt_write.c +++ b/vpi/lxt_write.c @@ -1102,11 +1102,9 @@ if(lt) lt_emitfacs(lt); if(lt->dict) lt_finalize_dictionary(lt); - if(lt->timebuff) - { - free(lt->timebuff); - lt->timebuff=NULL; - } + free(lt->timebuff); + lt->timebuff=NULL; + if(lt->timehead) { struct lt_timetrail *t=lt->timehead; @@ -1408,10 +1406,7 @@ if(lt) lt->mintime = lt->maxtime = timeval; } - if(lt->timebuff) - { - free(lt->timebuff); - } + free(lt->timebuff); lt->timebuff = trl; lt->timeval = timeval; rc=1; @@ -2814,8 +2809,11 @@ if((lt)&&(lt->dumpoff_active)) } /* - * $Id: lxt_write.c,v 1.4 2009/03/29 00:50:00 gtkwave Exp $ + * $Id: lxt_write.c,v 1.5 2010/05/03 20:11:03 gtkwave Exp $ * $Log: lxt_write.c,v $ + * Revision 1.5 2010/05/03 20:11:03 gtkwave + * cppcheck warning fixes + * * Revision 1.4 2009/03/29 00:50:00 gtkwave * update lt_close() to zero out written section offset/size. *