Bug 993

Summary: MinstrelWifiManager::UpdateStats useless if clause
Product: ns-3 Reporter: Quincy Tse <quincy.tse>
Component: wifiAssignee: Nicola Baldo <nicola>
Status: RESOLVED FIXED    
Severity: trivial CC: ns-bugs
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: Proposed pa

Description Quincy Tse 2010-09-16 00:28:38 UTC
../src/devices/wifi/minstrel-wifi-manager.cc:528:42: error:
      comparison of unsigned expression < 0 is always false
      [-Wtautological-compare]
          if (idx >= m_nsupported || idx < 0)
                                     ~~~ ^ ~

Here, idx is declared as uint32_t, and can never be <0. Hence the idx < 0 clause can be safely removed.
Comment 1 Quincy Tse 2010-09-16 00:30:32 UTC
Created attachment 975 [details]
Proposed pa
Comment 2 Nicola Baldo 2010-09-16 04:34:29 UTC
Quincy, thank you for this bug report and patch. Feel free to push it to ns-3-dev if you have commit privileges, otherwise just let me know and I'll do it.
Comment 3 Quincy Tse 2010-09-16 21:41:21 UTC
Can you please push it?
Comment 4 Nicola Baldo 2010-10-26 08:14:24 UTC
changeset:   6645:b89ac19713c6