This commit is contained in:
Laila van Reenen 2024-04-14 23:30:44 +02:00
parent 9c30ea4ef1
commit 3ed2ab432b
2 changed files with 4 additions and 5 deletions

View File

@ -8,17 +8,16 @@
// initilises a CMDList_t with all NULL pointers
CMDList_t* CMDList_init()
{
CMDList_t *list = malloc(sizeof(CMDList_t));
CMDList_t* list = malloc(sizeof(CMDList_t));
memset(list, 0, sizeof(CMDList_t));
return list;
}
// free up the full tree from memory
// does not free up the commands
int CMDList_deinit(CMDList_t *list)
int CMDList_deinit(CMDList_t* list)
{
CMDList_t** list_p;
*list_p = list;
CMDList_t** list_p = (CMDList_t**)list;
int i;
for (i = 0; i < 26; i++)

View File

@ -11,7 +11,7 @@ add_library(history History/History.c)
# CLI
add_library(CLI CLI/CLI.c)
target_link_libraries(CLI CMDList FIFOBuffChar)
target_link_libraries(CLI CMDList FIFOBuffChar history)
add_library(CLI_History CLI/CLI.c)
target_link_libraries(CLI_History CMDList FIFOBuffChar history)