summaryrefslogtreecommitdiff
path: root/src/routing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/routing.c')
-rw-r--r--src/routing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routing.c b/src/routing.c
index 64d5353..f26f1ba 100644
--- a/src/routing.c
+++ b/src/routing.c
@@ -136,7 +136,7 @@ bool routing_offer(struct nodeid* id, struct entry **dest) {
uint16_t baseIndex = base_bucket(id);
int8_t inBucketIndex = scan(baseIndex, id);
- if(inBucketIndex == -1) {
+ if(inBucketIndex < 0) {
// The bucket either already contains the node, or it has no more space
return false;
}
@@ -210,7 +210,7 @@ void routing_oldest(struct entry** dest) {
continue;
}
- if(difftime((*dest)->last, entry->last) > 0.0) {
+ if(difftime((*dest)->expire, entry->expire) > 0.0) {
*dest = entry;
}
}