From e45f43cd9297bb88f697283491cb17ea290ec562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Sun, 18 Feb 2018 08:22:29 +0100 Subject: [PATCH] wifi: Use uint8_t for indexes in minstrel --- src/wifi/model/minstrel-wifi-manager.cc | 2 +- src/wifi/model/minstrel-wifi-manager.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wifi/model/minstrel-wifi-manager.cc b/src/wifi/model/minstrel-wifi-manager.cc index f70f26bf0..2e37c6514 100644 --- a/src/wifi/model/minstrel-wifi-manager.cc +++ b/src/wifi/model/minstrel-wifi-manager.cc @@ -894,7 +894,7 @@ MinstrelWifiManager::GetNextSample (MinstrelWifiRemoteStation *station) //bookeeping for m_index and m_col variables NS_ABORT_MSG_IF (station->m_nModes < 2, "Integer overflow detected"); - if (station->m_index > static_cast (station->m_nModes - 2)) + if (station->m_index > station->m_nModes - 2) { station->m_index = 0; station->m_col++; diff --git a/src/wifi/model/minstrel-wifi-manager.h b/src/wifi/model/minstrel-wifi-manager.h index 297c0b656..6acdb4757 100644 --- a/src/wifi/model/minstrel-wifi-manager.h +++ b/src/wifi/model/minstrel-wifi-manager.h @@ -88,8 +88,8 @@ struct MinstrelWifiRemoteStation : public WifiRemoteStation * then we wrap back to the row 1 col 1. * note: there are many other ways to do this. */ - uint32_t m_col; ///< vector index - uint32_t m_index; ///< vector index + uint8_t m_col; ///< vector index + uint8_t m_index; ///< vector index uint32_t m_maxTpRate; ///< the current throughput rate uint32_t m_maxTpRate2; ///< second highest throughput rate uint32_t m_maxProbRate; ///< rate with highest prob of success