PE HTML>
H_LINKED_LISTS_H
. However, the name of the header
file is linked-list.h, without an “s”, therefore
the include-guards should be H_LINKED_LIST_H
.
cmp2()
we have
struct point *a = (struct point *)aa;That's not wrong, but the cast is redundant since the void pointer is compatible with all pointer types. That line may be written simply as
const struct point *a = *aa;
The redundant casts in the next two lines may be removed in the same way.
int catch_the_odds(void *aa)should be
int catch_the_odds(const void *aa)to be consistent with the declaration of
ll_filter()
.
conscell *ll_append(cons struct *list1, cons struct list2);is totally botched. It should be
conscell *ll_append(conscell *list1, conscell *list2);
Programming Projects in C |