Correct if block, only update neighbour->next_neighbour_update when the if-test is true. Avoid compiler warning.

This commit is contained in:
Petter Reinholdtsen 2013-10-13 22:18:38 +02:00
parent de376ca4bb
commit 051bcd77bc

View File

@ -1174,9 +1174,10 @@ int link_received_packet(struct decode_context *context, int sender_seq, char un
// force an update when we start hearing a new neighbour link // force an update when we start hearing a new neighbour link
if (link->link_timeout < now){ if (link->link_timeout < now){
if (neighbour->next_neighbour_update > now + 10); if (neighbour->next_neighbour_update > now + 10) {
neighbour->next_neighbour_update = now + 10; neighbour->next_neighbour_update = now + 10;
} }
}
link->link_timeout = now + (context->interface->destination->tick_ms *5); link->link_timeout = now + (context->interface->destination->tick_ms *5);
// force an update soon when we need to promptly ack packets // force an update soon when we need to promptly ack packets