From 8ad3d6bec8ff89c8d742869cff05735d6f023fc8 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 8 Jan 2017 03:10:42 +0700 Subject: Bug fixes by Clifford Wolf. --- src/map/if/ifLibLut.c | 4 ++++ src/opt/sbd/sbdCnf.c | 4 ++-- src/opt/sfm/sfmCnf.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/map/if/ifLibLut.c b/src/map/if/ifLibLut.c index 26fa137b..1033cc1f 100644 --- a/src/map/if/ifLibLut.c +++ b/src/map/if/ifLibLut.c @@ -75,6 +75,7 @@ If_LibLut_t * If_LibLutRead( char * FileName ) Abc_Print( 1, "Error in the LUT library file \"%s\".\n", FileName ); ABC_FREE( p->pName ); ABC_FREE( p ); + fclose( pFile ); return NULL; } @@ -93,6 +94,7 @@ If_LibLut_t * If_LibLutRead( char * FileName ) ABC_FREE( p->pName ); ABC_FREE( p ); Abc_Print( 1, "LUT %d has too many pins (%d). Max allowed is %d.\n", i, k, i ); + fclose( pFile ); return NULL; } @@ -105,6 +107,7 @@ If_LibLut_t * If_LibLutRead( char * FileName ) ABC_FREE( p->pName ); ABC_FREE( p ); Abc_Print( 1, "Skipping LUTs of size more than %d.\n", i ); + fclose( pFile ); return NULL; } i++; @@ -136,6 +139,7 @@ If_LibLut_t * If_LibLutRead( char * FileName ) } } + fclose( pFile ); return p; } diff --git a/src/opt/sbd/sbdCnf.c b/src/opt/sbd/sbdCnf.c index 6291baed..8705858e 100644 --- a/src/opt/sbd/sbdCnf.c +++ b/src/opt/sbd/sbdCnf.c @@ -44,7 +44,7 @@ ABC_NAMESPACE_IMPL_START ***********************************************************************/ void Sbd_PrintCnf( Vec_Str_t * vCnf ) { - char Entry; + signed char Entry; int i, Lit; Vec_StrForEachEntry( vCnf, Entry, i ) { @@ -121,7 +121,7 @@ int Sbd_TruthToCnf( word Truth, int nVars, Vec_Int_t * vCover, Vec_Str_t * vCnf void Sbd_TranslateCnf( Vec_Wec_t * vRes, Vec_Str_t * vCnf, Vec_Int_t * vFaninMap, int iPivotVar ) { Vec_Int_t * vClause; - char Entry; + signed char Entry; int i, Lit; Vec_WecClear( vRes ); vClause = Vec_WecPushLevel( vRes ); diff --git a/src/opt/sfm/sfmCnf.c b/src/opt/sfm/sfmCnf.c index 0ab92258..b4dd11f8 100644 --- a/src/opt/sfm/sfmCnf.c +++ b/src/opt/sfm/sfmCnf.c @@ -45,7 +45,7 @@ ABC_NAMESPACE_IMPL_START ***********************************************************************/ void Sfm_PrintCnf( Vec_Str_t * vCnf ) { - char Entry; + signed char Entry; int i, Lit; Vec_StrForEachEntry( vCnf, Entry, i ) { @@ -153,7 +153,7 @@ Vec_Wec_t * Sfm_CreateCnf( Sfm_Ntk_t * p ) void Sfm_TranslateCnf( Vec_Wec_t * vRes, Vec_Str_t * vCnf, Vec_Int_t * vFaninMap, int iPivotVar ) { Vec_Int_t * vClause; - char Entry; + signed char Entry; int i, Lit; Vec_WecClear( vRes ); vClause = Vec_WecPushLevel( vRes ); -- cgit v1.2.3