1 Commits
Author SHA1 Message Date
phoenix 2053f2132d Spruce it up (#1)
klist / build (push) Successful in 29s
Reviewed-on: #1
2026-09-19 16:52:06 -04:00
2 changed files with 5 additions and 7 deletions
+1 -3
View File
@@ -40,7 +40,7 @@ jobs:
- name: Configure Conan
run: |
conan profile detect --force # Create a default profile
conan profile detect --force
- name: Create build directory
run: mkdir build
@@ -59,5 +59,3 @@ jobs:
- name: Test with CTest (optional)
working-directory: build/Release
run: ctest -C Release
+4 -4
View File
@@ -44,15 +44,13 @@ int is_list_init(struct node **list)
else
return 0;
}
int list_size(struct node **list)
{
int count = 0;
struct node *tmp = *list;
struct node *in_tmp = NULL;
while (tmp != NULL || tmp->next != NULL) {
in_tmp = tmp;
tmp = tmp->next;
++count;
@@ -81,6 +79,7 @@ void insert_at_begin(struct node **list, void *val, size_t val_size)
tmp->next = *list;
*list = tmp;
}
void insert_at_end(struct node **list, void *val, size_t val_size)
{
struct node *tmp = (struct node*)malloc(sizeof(struct node));
@@ -102,6 +101,7 @@ void insert_at_end(struct node **list, void *val, size_t val_size)
tmp->next->data = tmp_val;
tmp->next->next = NULL;
}
void free_list(struct node **list)
{
struct node *t = NULL;
@@ -120,8 +120,8 @@ void free_list(struct node **list)
return;
}
while (l->next != NULL);
}
void traverse(struct node *list, void (*print_val)(struct node*))
{
if (list == NULL)