watchlist: Remove unused APIs

watchlist_new and watchlist_free were never used.  Get rid of them.
This commit is contained in:
Denis Kenzior 2024-05-29 17:51:48 -05:00
parent fdbbd8b383
commit b3e7b7539e
2 changed files with 0 additions and 19 deletions

View File

@ -48,16 +48,6 @@ static void watchlist_item_free(struct watchlist *watchlist,
l_free(item);
}
struct watchlist *watchlist_new(const struct watchlist_ops *ops)
{
struct watchlist *watchlist;
watchlist = l_new(struct watchlist, 1);
watchlist->items = l_queue_new();
watchlist->ops = ops;
return watchlist;
}
void watchlist_init(struct watchlist *watchlist,
const struct watchlist_ops *ops)
{
@ -137,13 +127,6 @@ void watchlist_destroy(struct watchlist *watchlist)
watchlist->items = NULL;
}
void watchlist_free(struct watchlist *watchlist)
{
watchlist_clear(watchlist);
l_queue_destroy(watchlist->items, NULL);
l_free(watchlist);
}
void __watchlist_prune_stale(struct watchlist *watchlist)
{
struct watchlist_item *item;

View File

@ -42,7 +42,6 @@ struct watchlist {
const struct watchlist_ops *ops;
};
struct watchlist *watchlist_new(const struct watchlist_ops *ops);
void watchlist_init(struct watchlist *watchlist,
const struct watchlist_ops *ops);
unsigned int watchlist_add(struct watchlist *watchlist, void *notify,
@ -54,7 +53,6 @@ unsigned int watchlist_link(struct watchlist *watchlist,
watchlist_item_destroy_func_t destroy);
bool watchlist_remove(struct watchlist *watchlist, unsigned int id);
void watchlist_destroy(struct watchlist *watchlist);
void watchlist_free(struct watchlist *watchlist);
void __watchlist_prune_stale(struct watchlist *watchlist);