mirror of https://gitee.com/openkylin/linux.git
staging: rtl8193*: Remove double test
The 1 element of the array is tested twice. Change the code so that the remaining 3 element of the array is tested instead of testing the 1 element a second time. The sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @expression@ expression E; @@ ( * E || ... || E | * E && ... && E ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
15300c1df7
commit
4498dbcd2d
|
@ -2579,7 +2579,7 @@ static inline void update_network(struct ieee80211_network *dst,
|
|||
if(src->wmm_param[0].ac_aci_acm_aifsn|| \
|
||||
src->wmm_param[1].ac_aci_acm_aifsn|| \
|
||||
src->wmm_param[2].ac_aci_acm_aifsn|| \
|
||||
src->wmm_param[1].ac_aci_acm_aifsn) {
|
||||
src->wmm_param[3].ac_aci_acm_aifsn) {
|
||||
memcpy(dst->wmm_param, src->wmm_param, WME_AC_PRAM_LEN);
|
||||
}
|
||||
//dst->QoS_Enable = src->QoS_Enable;
|
||||
|
|
|
@ -2391,7 +2391,7 @@ static inline void update_network(struct ieee80211_network *dst,
|
|||
if(src->wmm_param[0].ac_aci_acm_aifsn|| \
|
||||
src->wmm_param[1].ac_aci_acm_aifsn|| \
|
||||
src->wmm_param[2].ac_aci_acm_aifsn|| \
|
||||
src->wmm_param[1].ac_aci_acm_aifsn) {
|
||||
src->wmm_param[3].ac_aci_acm_aifsn) {
|
||||
memcpy(dst->wmm_param, src->wmm_param, WME_AC_PRAM_LEN);
|
||||
}
|
||||
//dst->QoS_Enable = src->QoS_Enable;
|
||||
|
|
Loading…
Reference in New Issue