diff --git a/c/linked-list/br-common.h b/c/linked-list/br-common.h index ca7968e..2b7ac2c 100644 --- a/c/linked-list/br-common.h +++ b/c/linked-list/br-common.h @@ -26,7 +26,7 @@ #if __has_attribute(__fallthrough__) # define fallthrough __attribute__((__fallthrough__)) #else -# define fallthrough do {} while (0); /* fallthrough */ +# define fallthrough do {} while (0) /* fallthrough */ #endif /* See GNUmakefile below for explanation diff --git a/c/linked-list/linked_list.c b/c/linked-list/linked_list.c index 1f42e91..e3f6eaa 100644 --- a/c/linked-list/linked_list.c +++ b/c/linked-list/linked_list.c @@ -130,8 +130,7 @@ void list_delete(const struct list *list, const ll_data_t data) */ void list_destroy(struct list *list) { - struct list_head *cur; - __typeof(cur) tmp; + struct list_head *cur, *tmp; list_for_each_safe(cur, tmp, (struct list_head *)list) _list_del(cur);