Commit 702ecb20 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Change costs to be unsigned.

parent 78b3098b
...@@ -256,14 +256,14 @@ reset_txcost(struct neighbour *neigh) ...@@ -256,14 +256,14 @@ reset_txcost(struct neighbour *neigh)
return 0; return 0;
} }
int unsigned
neighbour_txcost(struct neighbour *neigh) neighbour_txcost(struct neighbour *neigh)
{ {
reset_txcost(neigh); reset_txcost(neigh);
return neigh->txcost; return neigh->txcost;
} }
int unsigned
check_neighbours() check_neighbours()
{ {
struct neighbour *neigh; struct neighbour *neigh;
...@@ -304,7 +304,7 @@ check_neighbours() ...@@ -304,7 +304,7 @@ check_neighbours()
return msecs; return msecs;
} }
int unsigned
neighbour_rxcost(struct neighbour *neigh) neighbour_rxcost(struct neighbour *neigh)
{ {
int delay; int delay;
...@@ -339,7 +339,7 @@ neighbour_rxcost(struct neighbour *neigh) ...@@ -339,7 +339,7 @@ neighbour_rxcost(struct neighbour *neigh)
} }
} }
int unsigned
neighbour_cost(struct neighbour *neigh) neighbour_cost(struct neighbour *neigh)
{ {
int a, b; int a, b;
......
...@@ -50,7 +50,7 @@ struct neighbour *add_neighbour(const unsigned char *id, ...@@ -50,7 +50,7 @@ struct neighbour *add_neighbour(const unsigned char *id,
const unsigned char *address, const unsigned char *address,
struct network *net); struct network *net);
int update_neighbour(struct neighbour *neigh, int hello, int hello_interval); int update_neighbour(struct neighbour *neigh, int hello, int hello_interval);
int check_neighbours(void); unsigned check_neighbours(void);
int neighbour_txcost(struct neighbour *neigh); unsigned neighbour_txcost(struct neighbour *neigh);
int neighbour_rxcost(struct neighbour *neigh); unsigned neighbour_rxcost(struct neighbour *neigh);
int neighbour_cost(struct neighbour *neigh); unsigned neighbour_cost(struct neighbour *neigh);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment