[list] Remove useless DO_SLIST_UNREF
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
59aa2b2da7
commit
1dbea735b3
|
@ -179,21 +179,5 @@
|
|||
return item2; \
|
||||
}
|
||||
|
||||
#define DO_SLIST_UNREF(type, prefix, dtor) \
|
||||
static inline void prefix##_list_unref(type **list) \
|
||||
{ \
|
||||
type *next, *item = *list; \
|
||||
while(item) \
|
||||
{ \
|
||||
next = item->next; \
|
||||
if(--(item->refcount) <= 0) \
|
||||
{ \
|
||||
prefix##_list_detach(list, item); \
|
||||
dtor(&item); \
|
||||
} \
|
||||
item = next; \
|
||||
} \
|
||||
}
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
|
@ -39,7 +39,6 @@ void statusbar_refresh(void);
|
|||
|
||||
DO_RCNT(statusbar_t, statusbar, statusbar_delete)
|
||||
DO_SLIST(statusbar_t, statusbar, statusbar_delete)
|
||||
DO_SLIST_UNREF(statusbar_t, statusbar, statusbar_delete)
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
Loading…
Reference in New Issue