From: jesusc Date: Sun, 6 Jul 2003 22:11:31 +0000 (+0000) Subject: fclose FILE * != NULL X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=cdb212f367843cf9bcd9f9f27ab31568483100e3;p=fw%2Fsdcc fclose FILE * != NULL git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2725 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/support/librarian/sdcclib.c b/support/librarian/sdcclib.c index 6b191799..ef058e7a 100644 --- a/support/librarian/sdcclib.c +++ b/support/librarian/sdcclib.c @@ -204,7 +204,7 @@ void AddRel(void) if(rel==NULL) { printf("ERROR: Couldn't open file '%s'", RelName); - fclose(lib); + if(lib!=NULL) fclose(lib); return; } } @@ -214,7 +214,7 @@ void AddRel(void) if(newlib==NULL) { printf("ERROR: Couldn't create temporary file '%s'", LibNameTmp); - fclose(lib); + if(lib!=NULL) fclose(lib); fclose(rel); return; } @@ -224,7 +224,7 @@ void AddRel(void) if(libindex==NULL) { printf("ERROR: Couldn't create temporary file '%s'", IndexName); - fclose(lib); + if(lib!=NULL) fclose(lib); fclose(newlib); fclose(rel); return;