fixing some warning

dev
Ahmed Abdellah 2019-10-24 14:21:01 +01:00
parent 0e6a73b148
commit 5e206fdd53
2 changed files with 3 additions and 3 deletions

View File

@ -296,7 +296,7 @@ void UTIL_freeFileNamesTable(FileNamesTable* table) {
free(table->fileNames);
}
if(table->buf) {
if(table && table->buf) {
free(table->buf);
}

View File

@ -151,8 +151,8 @@ int UTIL_readLineFromFile(char* buf, size_t len, FILE* file);
/*Note: tableSize is denotes the total capacity of table*/
typedef struct
{
const char** fileNames;
char* buf;
const char** fileNames = NULL;
char* buf = NULL;
size_t tableSize;
} FileNamesTable;