summaryrefslogtreecommitdiffhomepage
path: root/interface-ip.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-15 11:00:23 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-01-15 11:12:53 +0100
commit4c08f23dfe3ddeb4949d80d84cc20d8117a54898 (patch)
tree151136b70c25ebbd0f0860c2a3ea084ded15ca9e /interface-ip.c
parent7872d4e2889c364ffa8e01ea43e465e21ab32a3c (diff)
interface-ip: replace prefix_assignment_cmp with avl_strcmp
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'interface-ip.c')
-rw-r--r--interface-ip.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/interface-ip.c b/interface-ip.c
index 8831d19..183935e 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -276,12 +276,6 @@ prefix_cmp(const void *k1, const void *k2, void *ptr)
offsetof(struct device_prefix, addr));
}
-static int
-prefix_assignment_cmp(const void *k1, const void *k2, void *ptr)
-{
- return strcmp((const char*)k1, (const char*)k2);
-}
-
static void
interface_handle_subnet_route(struct interface *iface, struct device_addr *addr, bool add)
{
@@ -586,7 +580,7 @@ interface_update_prefix(struct vlist_tree *tree,
} else if (node_new) {
prefix_new->avail = 1ULL << (64 - prefix_new->length);
prefix_new->assignments = calloc(1, sizeof(*prefix_new->assignments));
- vlist_init(prefix_new->assignments, prefix_assignment_cmp,
+ vlist_init(prefix_new->assignments, avl_strcmp,
interface_update_prefix_assignments);
// Create initial assignments for interfaces