From f2c4969fc9c7bbe97bef54ed3e3ebcf40739f18b Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Thu, 7 Sep 2017 23:04:43 +0200 Subject: [PATCH] watchlist: Pass item pointer to match function In WATCHLIST_NOTIFY_MATCHES pass pointer to the item instead of item->notify_data to free item->notify_data to be the final watch user's user_data. This is also what netdev expects. --- src/watchlist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/watchlist.h b/src/watchlist.h index 684193f1..737b80d3 100644 --- a/src/watchlist.h +++ b/src/watchlist.h @@ -83,7 +83,7 @@ void __watchlist_prune_stale(struct watchlist *watchlist); struct watchlist_item *item = entry->data; \ type t = item->notify; \ \ - if (!match(item->notify_data, match_data)) \ + if (!match(item, match_data)) \ continue; \ \ t(args, item->notify_data); \