From 3ed2ab432badce39765cac7338843eaf619d4d4e Mon Sep 17 00:00:00 2001 From: FReenen Date: Sun, 14 Apr 2024 23:30:44 +0200 Subject: [PATCH] update --- CMDList/CMDList.c | 7 +++---- CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMDList/CMDList.c b/CMDList/CMDList.c index a29db52..d24b445 100644 --- a/CMDList/CMDList.c +++ b/CMDList/CMDList.c @@ -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++) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec5cf73..0905f99 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)