diff options
author | Joseph Henry <josephjah@gmail.com> | 2019-01-25 13:24:31 -0800 |
---|---|---|
committer | Joseph Henry <josephjah@gmail.com> | 2019-01-25 13:24:31 -0800 |
commit | d7091a0bac1b0d480a9d69f794f2c3f1eeebd448 (patch) | |
tree | 4f933b07d5586107992dbd9fd0a523e95ab728f5 | |
parent | 7414418e2e50f729bceda64b60e18f893ae3b843 (diff) | |
download | infinitytier-d7091a0bac1b0d480a9d69f794f2c3f1eeebd448.tar.gz infinitytier-d7091a0bac1b0d480a9d69f794f2c3f1eeebd448.zip |
Fixed sign-comparison compile warnings in QoS code
-rw-r--r-- | node/Switch.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp index 74c22d33..58979e26 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -532,7 +532,7 @@ void Switch::aqm_enqueue(void *tPtr, const SharedPtr<Network> &network, Packet & TXQueueEntry *txEntry = new TXQueueEntry(dest,RR->node->now(),packet,encrypt); ManagedQueue *selectedQueue = nullptr; - for (int i=0; i<ZT_QOS_NUM_BUCKETS; i++) { + for (size_t i=0; i<ZT_QOS_NUM_BUCKETS; i++) { if (i < nqcb->oldQueues.size()) { // search old queues first (I think this is best since old would imply most recent usage of the queue) if (nqcb->oldQueues[i]->id == qosBucket) { selectedQueue = nqcb->oldQueues[i]; @@ -568,7 +568,7 @@ void Switch::aqm_enqueue(void *tPtr, const SharedPtr<Network> &network, Packet & { // DEBUG_INFO("too many enqueued packets (%d), finding packet to drop", nqcb->_currEnqueuedPackets); int maxQueueLength = 0; - for (int i=0; i<ZT_QOS_NUM_BUCKETS; i++) { + for (size_t i=0; i<ZT_QOS_NUM_BUCKETS; i++) { if (i < nqcb->oldQueues.size()) { if (nqcb->oldQueues[i]->byteLength > maxQueueLength) { maxQueueLength = nqcb->oldQueues[i]->byteLength; |