Assume balanceOf[msg.sender]
is typed as uint256, and a user wants to withdraw _amount
units from her balances (_amount
is also typed uint256). In that case
balanceOf[msg.sender] -= _amount;
will revert if balanceOf[msg.sender] < _amount
. Does this make the following requirement unnecessary?
require(balanceOf[msg.sender] >= _amount);
It now seems redundant.