summaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-05-25 21:01:30 +0200
committerFelix Fietkau <nbd@openwrt.org>2014-05-25 21:01:30 +0200
commit5659c8226cc7b0d09ab255525f8951e35cf6ac2a (patch)
tree156728f0207eb1c677df0f099e355d701f74fa95 /service
parentbdbd2ea3fb127c7dfb2f591e4d2ab11a2c106e0a (diff)
downloadunitd-5659c8226cc7b0d09ab255525f8951e35cf6ac2a.tar
unitd-5659c8226cc7b0d09ab255525f8951e35cf6ac2a.zip
service: use avl_remove_all_elements()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'service')
-rw-r--r--service/validate.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/service/validate.c b/service/validate.c
index ca9bb39..2e610c7 100644
--- a/service/validate.c
+++ b/service/validate.c
@@ -100,10 +100,9 @@ service_validate_del(struct service *s)
list_for_each_entry_safe(v, n, &s->validators, list) {
struct vrule *vr, *a;
- avl_for_each_element_safe(&v->rules, vr, avl, a) {
- avl_delete(&v->rules, &vr->avl);
+ avl_remove_all_elements(&v->rules, vr, avl, a)
free(vr);
- }
+
avl_delete(&validators, &v->avl);
list_del(&v->list);
free(v);