• Jiri Slaby's avatar
    mac80211/minstrel: fix !x!=0 confusion · 17dce158
    Jiri Slaby authored
    Commit 06d961a8 ("mac80211/minstrel: use the new rate control API")
    inverted the condition 'if (msr->sample_limit != 0)' to
    'if (!msr->sample_limit != 0)'. But it is confusing both to people and
    compilers (gcc5):
    net/mac80211/rc80211_minstrel.c: In function 'minstrel_get_rate':
    net/mac80211/rc80211_minstrel.c:376:26: warning: logical not is only applied to the left hand side of comparison
       if (!msr->sample_limit != 0)
                              ^
    
    Let there be only 'if (!msr->sample_limit)'.
    
    Fixes: 06d961a8 ("mac80211/minstrel: use the new rate control API")
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    17dce158
rc80211_minstrel.c 19.5 KB