Christmas Dinner

First Flight #31
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

Unutilized Named Return Variable in getHost Method

Summary

The getHost method declares a named return variable _host but does not utilize it. Instead, it explicitly uses the return statement with the host state variable. This results in an inconsistency in the function's implementation and deviates from Solidity best practices for named return variables.

Vulnerability Details

function getHost() public view returns (address _host) {
return host;
}

Impact

The issue does not affect the functionality but leads to minor code quality concerns.

  • It can create confusion for developers reading or maintaining the code.

Tools Used

manual

Recommendations

Modify the getHost method to properly utilize the named return variable _host:

function getHost() public view returns (address _host) {
_host = host;
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.