kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=651c56bb295ebd3b0ceedb8cd60ba35c275e8e93
commit 651c56bb295ebd3b0ceedb8cd60ba35c275e8e93 Author: Kim Woelders <k...@woelders.dk> Date: Mon Apr 12 08:04:24 2021 +0200 Drop unused Imlib_Object_List:last --- src/lib/font.h | 1 - src/lib/font_main.c | 21 ++++++++------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/lib/font.h b/src/lib/font.h index af791c3..e9b86fd 100644 --- a/src/lib/font.h +++ b/src/lib/font.h @@ -15,7 +15,6 @@ typedef struct _Imlib_Hash_El Imlib_Hash_El; struct _Imlib_Object_List { Imlib_Object_List *next, *prev; - Imlib_Object_List *last; }; struct _Imlib_Hash { diff --git a/src/lib/font_main.c b/src/lib/font_main.c index e3b6eb5..d83858c 100644 --- a/src/lib/font_main.c +++ b/src/lib/font_main.c @@ -190,13 +190,10 @@ __imlib_object_list_prepend(void *in_list, void *in_item) if (!list) { new_l->next = NULL; - new_l->last = new_l; return new_l; } new_l->next = list; list->prev = new_l; - new_l->last = list->last; - list->last = NULL; return new_l; } @@ -204,18 +201,18 @@ void * __imlib_object_list_remove(void *in_list, void *in_item) { Imlib_Object_List *return_l; - Imlib_Object_List *list, *item; + Imlib_Object_List *list = in_list; + Imlib_Object_List *item = in_item; /* checkme */ - if (!in_list) - return in_list; - - list = in_list; - item = in_item; + if (!list) + return list; if (!item) return list; + if (item->next) item->next->prev = item->prev; + if (item->prev) { item->prev->next = item->next; @@ -224,13 +221,11 @@ __imlib_object_list_remove(void *in_list, void *in_item) else { return_l = item->next; - if (return_l) - return_l->last = list->last; } - if (item == list->last) - list->last = item->prev; + item->next = NULL; item->prev = NULL; + return return_l; } --