diff --git a/src/olsr/model/olsr-header.cc b/src/olsr/model/olsr-header.cc index 70563dcae..41b8705ad 100644 --- a/src/olsr/model/olsr-header.cc +++ b/src/olsr/model/olsr-header.cc @@ -53,7 +53,7 @@ SecondsToEmf (double seconds) NS_ASSERT_MSG (seconds >= OLSR_C, "SecondsToEmf - Can not convert a value less than OLSR_C"); // find the largest integer 'b' such that: T/C >= 2^b - for (b = 0; (seconds / OLSR_C) >= (1 << b); ++b) + for (b = 1; (seconds / OLSR_C) >= (1 << b); ++b) { } NS_ASSERT ((seconds / OLSR_C) < (1 << b)); diff --git a/src/olsr/model/olsr-routing-protocol.cc b/src/olsr/model/olsr-routing-protocol.cc index 3c86e46c7..817c417d9 100644 --- a/src/olsr/model/olsr-routing-protocol.cc +++ b/src/olsr/model/olsr-routing-protocol.cc @@ -1981,9 +1981,8 @@ RoutingProtocol::LinkSensing (const olsr::MessageHeader &msg, case OLSR_LOST_LINK: linkTypeName = "LOST_LINK"; break; - /* no default, since lt must be in 0..3, covered above default: linkTypeName = "(invalid value!)"; - */ + } const char *neighborTypeName;