Skip to content

libnetwork/drivers/bridge: setupIPChains(): name output variables#46236

Merged
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:libnetwork_bridge_outputvars
Aug 16, 2023
Merged

libnetwork/drivers/bridge: setupIPChains(): name output variables#46236
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:libnetwork_bridge_outputvars

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

This function has four output variables of the same type, and several defer statements that checked the error returned (but using the err variable).

This patch names the return variables to make it clearer what's being returned, and renames the error-return to retErr to make it clearer where we're dealing with the returned error (and not any local err), to prevent accidentally shadowing.

- A picture of a cute animal (not mandatory but encouraged)

This function has _four_ output variables of the same type, and several
defer statements that checked the error returned (but using the `err`
variable).

This patch names the return variables to make it clearer what's being
returned, and renames the error-return to `retErr` to make it clearer
where we're dealing with the returned error (and not any local err), to
prevent accidentally shadowing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added status/2-code-review area/networking Networking kind/refactor PR's that refactor, or clean-up code area/networking/d/bridge Networking labels Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/networking/d/bridge Networking area/networking Networking kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants