diff --git a/src/olsr/model/olsr-header.cc b/src/olsr/model/olsr-header.cc index 30a2b09c0..70563dcae 100644 --- a/src/olsr/model/olsr-header.cc +++ b/src/olsr/model/olsr-header.cc @@ -50,6 +50,8 @@ SecondsToEmf (double seconds) { int a, b = 0; + 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) {