Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc7d21ca authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: replace redundant computations with 0



Shifting and masking strHostIfSetMulti->enabled is redundant since
enabled is a bool and so all the shifted and masked values will be
zero. Replace them with zero to simplify the code.

Detected by CoverityScan, CID#1339458 ("Bad shift operation") and
CID#1339506 ("Operands don't affect result").

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2d10b857
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2420,9 +2420,9 @@ static void Handle_SetMulticastFilter(struct wilc_vif *vif,

	pu8CurrByte = wid.val;
	*pu8CurrByte++ = (strHostIfSetMulti->enabled & 0xFF);
	*pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 8) & 0xFF);
	*pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 16) & 0xFF);
	*pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 24) & 0xFF);
	*pu8CurrByte++ = 0;
	*pu8CurrByte++ = 0;
	*pu8CurrByte++ = 0;

	*pu8CurrByte++ = (strHostIfSetMulti->cnt & 0xFF);
	*pu8CurrByte++ = ((strHostIfSetMulti->cnt >> 8) & 0xFF);