commit f90c067e32e77a64c838fc73a0219190fb56ea63
parent f47d74f471b69da70d9c10b6b2856a3d051e3720
Author: William Casarin <jb55@jb55.com>
Date: Fri, 9 Feb 2024 14:14:09 -0800
filter: make sure to return clone errors
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/nostrdb.c b/src/nostrdb.c
@@ -1156,8 +1156,7 @@ static int ndb_filter_group_add(struct ndb_filter_group *group,
if (group->num_filters + 1 > MAX_FILTERS)
return 0;
- ndb_filter_clone(&group->filters[group->num_filters++], filter);
- return 1;
+ return ndb_filter_clone(&group->filters[group->num_filters++], filter);
}
static int ndb_filter_group_matches(struct ndb_filter_group *group,