Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix ns3
[simgrid.git] / src / surf / ns3 / red-queue.cc
index ca26c5e..3be1e16 100644 (file)
@@ -1,4 +1,9 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/* Copyright (c) 2011, 2014. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 /*
  * Copyright (c) 2010 Regents of the University of California
  *
@@ -326,7 +331,7 @@ RedQueue::Rmask (uint32_t pLog)
 {
   ///> ~OUL creates a 32 bit mask
   ///> 2^Plog - 1
-  return pLog < 32 ? ((1 << pLog) - 1) : ~0UL;
+  return pLog < 32 ? ((1 << pLog) - 1) : (uint32_t) ~0UL;
 
 }
 
@@ -418,7 +423,7 @@ RedQueue::AvgFromIdleTime ()
 
   if (idleTime > m_scellMax)
     {
-      idleTime = m_scellMax; 
+      idleTime = m_scellMax;
     }
 
   NS_LOG_DEBUG ("\t idleTime=" << idleTime);
@@ -721,7 +726,7 @@ RedQueue::DropPacket (Ptr<Packet> p)
         {
          packetSize= p->GetSize ();
           m_packets.erase(iter);
-          m_bytesInQueue -= packetSize; 
+          m_bytesInQueue -= packetSize;
           return 1;
         }
     }