X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fedge.c;h=95e7f7e03eb76b5fb5f803c703c8a34fe85dc108;hp=48ead007e413cdb10672135b48930894bd9890d7;hb=ae50b0077e27c4c4d81a98da46c66865ffa069be;hpb=e449d94caef963809d417f16497f6f978e10d731 diff --git a/src/edge.c b/src/edge.c index 48ead007..95e7f7e0 100644 --- a/src/edge.c +++ b/src/edge.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: edge.c,v 1.1.2.22 2003/07/17 15:06:26 guus Exp $ + $Id: edge.c,v 1.1.2.24 2003/07/29 10:50:15 guus Exp $ */ #include "system.h" @@ -32,12 +32,12 @@ avl_tree_t *edge_weight_tree; /* Tree with all edges, sorted on weight */ -static int edge_compare(edge_t *a, edge_t *b) +static int edge_compare(const edge_t *a, const edge_t *b) { return strcmp(a->to->name, b->to->name); } -static int edge_weight_compare(edge_t *a, edge_t *b) +static int edge_weight_compare(const edge_t *a, const edge_t *b) { int result; @@ -125,13 +125,13 @@ void edge_del(edge_t *e) edge_t *lookup_edge(node_t *from, node_t *to) { - edge_t v; + edge_t v = { + .from = from, + .to = to + }; cp(); - v.from = from; - v.to = to; - return avl_search(from->edge_tree, &v); }