projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Woops!
[tinc]
/
src
/
edge.c
diff --git
a/src/edge.c
b/src/edge.c
index
3bceb00
..
9dbb0c8
100644
(file)
--- a/
src/edge.c
+++ b/
src/edge.c
@@
-17,37
+17,27
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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.2
1 2003/07/12 17:41
:45 guus Exp $
+ $Id: edge.c,v 1.1.2.2
5 2003/07/30 11:50
:45 guus Exp $
*/
*/
-#include "config.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#include <avl_tree.h>
-#include <list.h>
+#include "system.h"
-#include "net.h" /* Don't ask. */
-#include "netutl.h"
-#include "conf.h"
-#include <utils.h>
-#include "subnet.h"
+#include "avl_tree.h"
#include "edge.h"
#include "edge.h"
-#include "node.h"
#include "logger.h"
#include "logger.h"
-
+#include "netutl.h"
+#include "node.h"
+#include "utils.h"
#include "xalloc.h"
#include "xalloc.h"
-#include "system.h"
avl_tree_t *edge_weight_tree; /* Tree with all edges, sorted on weight */
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);
}
{
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;
{
int result;
@@
-136,7
+126,7
@@
void edge_del(edge_t *e)
edge_t *lookup_edge(node_t *from, node_t *to)
{
edge_t v;
edge_t *lookup_edge(node_t *from, node_t *to)
{
edge_t v;
-
+
cp();
v.from = from;
cp();
v.from = from;