The balance is checked for strict equality.Avoid checking for strict balance equality:an adversary can forcibly send ether to any address via selfdestruct() or by mining.
function myFoo(uint[] memory a) public returns(uint) {
a[1];
a[1:];
a[:2];
return a[1:2];
}
function goodPrictice(address addr) public {
if(myFoo(addr.balance) == 0) {
}
if (this.balance > 100 wei) {
}
if (address(this).balance >= 100 wei) {
}
if (addr.balance <= 100 wei) {
}
if (msg.sender.balance < 100 wei) {
}
if (foo(addr).balance >= 100 wei) {
}
}
function foo(address _addr) public returns(address) {
return _addr;
}
}
```
### Abstract Syntax Tree
[Click Here](https://astexplorer.net/#/gist/c4237a1f1672914443241ccf90d34cdc/b74242bf8de85a8c4df8dc7a16b26440b52f9c80) to view the AST for the above code. Code generated from AST Explorer using _solidity-parser-antlr-0.4.11_