summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2017-01-08 03:10:42 +0700
committerAlan Mishchenko <alanmi@berkeley.edu>2017-01-08 03:10:42 +0700
commit8ad3d6bec8ff89c8d742869cff05735d6f023fc8 (patch)
tree11525eb31e52ca494672a93f3a18d44b369b0bcc
parenta2813847318bf22e0c36c7141047eaa82657f60d (diff)
downloadabc-8ad3d6bec8ff89c8d742869cff05735d6f023fc8.tar.gz
abc-8ad3d6bec8ff89c8d742869cff05735d6f023fc8.tar.bz2
abc-8ad3d6bec8ff89c8d742869cff05735d6f023fc8.zip
Bug fixes by Clifford Wolf.
-rw-r--r--src/map/if/ifLibLut.c4
-rw-r--r--src/opt/sbd/sbdCnf.c4
-rw-r--r--src/opt/sfm/sfmCnf.c4
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 );