X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2f810149832a2d855c33d0df5b02d736c2081e41..5cafe2f3ba05448e2c932bccbe4acd809d7295ec:/src/surf/ns3/red-queue.cc diff --git a/src/surf/ns3/red-queue.cc b/src/surf/ns3/red-queue.cc index ca26c5e46a..3be1e16d5b 100644 --- a/src/surf/ns3/red-queue.cc +++ b/src/surf/ns3/red-queue.cc @@ -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 p) { packetSize= p->GetSize (); m_packets.erase(iter); - m_bytesInQueue -= packetSize; + m_bytesInQueue -= packetSize; return 1; } }