"> 0" is less efficient than "!= 0" for unsigned integers #24
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
ye0lde
Vulnerability details
Impact
Gas savings
Proof of Concept
"> 0" is used in the following location(s):
https://github.com/maple-labs/debt-locker/blob/81f55907db7b23d27e839b9f9f73282184ed4744/contracts/DebtLocker.sol#L312
Tools Used
Visual Studio Code, Remix
Recommended Mitigation Steps
Change "> 0" to "!=0" for small gas savings.
The text was updated successfully, but these errors were encountered: