src/lte/model/fdtbfq-ff-mac-scheduler.cc
changeset 9790 f226e8acee4a
parent 9788 a1c1c87153b5
child 9807 1a263c1b16c7
--- a/src/lte/model/fdtbfq-ff-mac-scheduler.cc	Thu May 16 10:52:29 2013 -0400
+++ b/src/lte/model/fdtbfq-ff-mac-scheduler.cc	Thu May 16 10:57:10 2013 -0400
@@ -30,6 +30,7 @@
 #include <ns3/boolean.h>
 #include <ns3/integer.h>
 #include <set>
+#include <cfloat>
 
 NS_LOG_COMPONENT_DEFINE ("FdTbfqFfMacScheduler");
 
@@ -1573,7 +1574,7 @@
               sinrNum++;
             }
         }
-      double estimatedSinr = sinrSum / (double)sinrNum;
+      double estimatedSinr = (sinrNum > 0) ? (sinrSum / sinrNum) : DBL_MAX;
       // store the value
       (*itCqi).second.at (rb) = estimatedSinr;
       return (estimatedSinr);