Browse Source

Merge pull request #223 from aragon/safe-math-div

[SafeMath] Remove unnecessary checks from safeDiv
Manuel Aráoz 8 years ago
parent
commit
0983f0065d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      contracts/SafeMath.sol

+ 2 - 2
contracts/SafeMath.sol

@@ -12,9 +12,9 @@ library SafeMath {
   }
 
   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;
-    assert(a == b * c + a % b);
+    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
     return c;
   }