olsr: fix static code analysys warnings (thanks to Natale Patriciello)

This commit is contained in:
Tommaso Pecorella
2017-02-17 00:24:44 +01:00
parent 8954c498b9
commit fd4b8f4fe4

View File

@@ -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)
{