Message ID | 20240529225243.261672-1-denkenz@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | watchlist: Remove unused APIs | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
prestwoj/iwd-alpine-ci-fetch | success | Fetch PR |
prestwoj/iwd-ci-gitlint | success | GitLint |
prestwoj/iwd-ci-fetch | success | Fetch PR |
prestwoj/iwd-alpine-ci-setupell | success | Prep - Setup ELL |
prestwoj/iwd-ci-setupell | success | Prep - Setup ELL |
prestwoj/iwd-ci-makedistcheck | success | Make Distcheck |
prestwoj/iwd-ci-incremental_build | success | Incremental build not run PASS |
prestwoj/iwd-alpine-ci-makedistcheck | success | Make Distcheck |
prestwoj/iwd-alpine-ci-incremental_build | success | Incremental build not run PASS |
prestwoj/iwd-ci-build | success | Build - Configure |
prestwoj/iwd-alpine-ci-build | success | Build - Configure |
prestwoj/iwd-ci-makecheckvalgrind | success | Make Check w/Valgrind |
prestwoj/iwd-ci-clang | success | clang PASS |
prestwoj/iwd-ci-makecheck | success | Make Check |
prestwoj/iwd-alpine-ci-makecheckvalgrind | success | Make Check w/Valgrind |
prestwoj/iwd-alpine-ci-makecheck | success | Make Check |
prestwoj/iwd-ci-testrunner | success | test-runner PASS |
On 5/29/24 5:52 PM, Denis Kenzior wrote: > watchlist_new and watchlist_free were never used. Get rid of them. > --- > src/watchlist.c | 17 ----------------- > src/watchlist.h | 2 -- > 2 files changed, 19 deletions(-) > Applied.
diff --git a/src/watchlist.c b/src/watchlist.c index c73169bc446f..899b983e65fe 100644 --- a/src/watchlist.c +++ b/src/watchlist.c @@ -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; diff --git a/src/watchlist.h b/src/watchlist.h index 7f5f557a2458..8ceedcefe64e 100644 --- a/src/watchlist.h +++ b/src/watchlist.h @@ -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);