fixing some warning
This commit is contained in:
+1
-1
@@ -296,7 +296,7 @@ void UTIL_freeFileNamesTable(FileNamesTable* table) {
|
|||||||
free(table->fileNames);
|
free(table->fileNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(table->buf) {
|
if(table && table->buf) {
|
||||||
free(table->buf);
|
free(table->buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -151,8 +151,8 @@ int UTIL_readLineFromFile(char* buf, size_t len, FILE* file);
|
|||||||
/*Note: tableSize is denotes the total capacity of table*/
|
/*Note: tableSize is denotes the total capacity of table*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
const char** fileNames;
|
const char** fileNames = NULL;
|
||||||
char* buf;
|
char* buf = NULL;
|
||||||
size_t tableSize;
|
size_t tableSize;
|
||||||
} FileNamesTable;
|
} FileNamesTable;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user