Search Linux Wireless

rtlwifi/rtl8188ee/dm.c:1081: possible bad if test ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello there,

I just ran the static analyser "cppcheck" over the source code of linux-3.12

It said

[linux-3.12/drivers/net/wireless/rtlwifi/rtl8188ee/dm.c:1081] -> [linux-3.12/drivers/net/wireless/rtlwifi/rtl8188ee/dm.c:1081]: (style) Same expression on both sides of '!='.

Source code is

            if (rtldm->swing_idx_cck != rtldm->swing_idx_cck) {
                rtldm->swing_idx_cck_cur = rtldm->swing_idx_cck;
                rtldm->swing_flag_cck = true;
            }

Suggest code rework. Maybe something like

            if (rtldm->swing_idx_cck_cur != rtldm->swing_idx_cck) {
                rtldm->swing_idx_cck_cur = rtldm->swing_idx_cck;
                rtldm->swing_flag_cck = true;
            }

might be suitable.

Regards

David Binderman 		 	   		  --
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux