summaryrefslogtreecommitdiffhomepage
path: root/interface.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-04 00:02:38 +0100
committerFelix Fietkau <nbd@openwrt.org>2012-03-04 00:02:38 +0100
commitc6e1778d4429032087b36fb0dde2ae2fecf53b4a (patch)
tree04e0f830cf5bfc8f4c3a4b72d62bd126e45d2f69 /interface.c
parent9fe20c8cbc4249c13d6f305adc91f4bc695f7c23 (diff)
simplify vlist, move avl key handling to vlist_add()
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/interface.c b/interface.c
index 6e3feeb..4d9aa8a 100644
--- a/interface.c
+++ b/interface.c
@@ -349,7 +349,7 @@ interface_add(struct interface *iface, struct blob_attr *config)
iface->ifname = blobmsg_data(cur);
iface->config = config;
- vlist_add(&interfaces, &iface->node);
+ vlist_add(&interfaces, &iface->node, iface->name);
}
int
@@ -553,8 +553,7 @@ interface_update(struct vlist_tree *tree, struct vlist_node *node_new,
static void __init
interface_init_list(void)
{
- vlist_init(&interfaces, avl_strcmp, interface_update,
- struct interface, node, name);
+ vlist_init(&interfaces, avl_strcmp, interface_update);
interfaces.keep_old = true;
interfaces.no_delete = true;
}