diff options
Diffstat (limited to 'src/map/if')
-rw-r--r-- | src/map/if/ifDec16.c | 2 | ||||
-rw-r--r-- | src/map/if/ifLibLut.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/map/if/ifDec16.c b/src/map/if/ifDec16.c index 22de91ba..4b555bf8 100644 --- a/src/map/if/ifDec16.c +++ b/src/map/if/ifDec16.c @@ -902,7 +902,7 @@ void If_CluReverseOrder_old( word * pF, int nVars, int * V2P, int * P2V, int iVa // return the number of cofactors w.r.t. the topmost vars (nBSsize) int If_CluCountCofs( word * pF, int nVars, int nBSsize, int iShift, word pCofs[3][CLU_WRD_MAX/4] ) { - word iCofs[128], iCof, Result = 0; + word iCofs[128] = {0}, iCof, Result = 0; word * pCofA, * pCofB; int nMints = (1 << nBSsize); int i, c, w, nCofs; 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; } |