wise-foundation / lending-audit

5 stars 4 forks source link

[AHR-02S] Redundant Variable Assignments #107

Open vm06007 opened 1 year ago

vm06007 commented 1 year ago

AHR-02S: Redundant Variable Assignments

Type Severity Location
Gas Optimization AaveHelper.sol:L317, L349

Description:

The linked variables are assigned to redundantly to the default value of each relevant data type (i.e. uint256 assigned to 0, address assigned to address(0) etc.).

Example:

for (i = 0; i < l; ++i) {

Recommendation:

We advise the assignments to be safely omitted optimizing the codebase.

vm06007 commented 1 year ago

Resolved in: https://github.com/wise-foundation/lending-audit/pull/51