Remove unnecessary checks from safeDiv

This commit is contained in:
Jorge Izquierdo
2017-05-21 16:41:18 -04:00
parent ecbfcbb302
commit c4f78a5dd5

View File

@ -12,9 +12,9 @@ library SafeMath {
} }
function div(uint a, uint b) internal returns (uint) { function div(uint a, uint b) internal returns (uint) {
assert(b > 0); // assert(b > 0); // Solidity automatically throws when dividing by 0
uint c = a / b; uint c = a / b;
assert(a == b * c + a % b); // assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c; return c;
} }