Re: [PATCH net-next] net: stmmac: do not use a bitwise AND operator with a bool operand

2018-01-24 Thread David Miller
From: Niklas Cassel Date: Mon, 22 Jan 2018 16:59:50 +0100 > Doing a bitwise AND between a bool and an int is generally not a good idea. > The bool will be promoted to an int with value 0 or 1, > the int is generally regarded as true with a non-zero value, > thus ANDing them has the potential to y

[PATCH net-next] net: stmmac: do not use a bitwise AND operator with a bool operand

2018-01-22 Thread Niklas Cassel
Doing a bitwise AND between a bool and an int is generally not a good idea. The bool will be promoted to an int with value 0 or 1, the int is generally regarded as true with a non-zero value, thus ANDing them has the potential to yield an undesired result. This commit fixes the following smatch wa