Skip to content

incusd: remove unreachable code in api internal #2016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 29, 2025

Conversation

The127
Copy link
Contributor

@The127 The127 commented Apr 28, 2025

This PR removes unrechable code in cmd/incud/api_internal.go and also updates an outdated comment .

The127 added 4 commits April 28, 2025 11:11
Removes a conditional check in the api_internal.go where instName was checked to be not the empty string. This is always true since at the top of the function it is already checked and an error returned in that case.

Signed-off-by: karo <[email protected]>
Changes a comment that was referencing a no longer existing option that was removed in 14a5882.

Signed-off-by: karo <[email protected]>
Removes code in the internalImportFromBackup function that was unreachable since the same condition further up leads to a return of the function.

Signed-off-by: karo <[email protected]>
Removes code in the internalImportFromBackup function that was unreachable since the same condition further up leads to a return of the function.

Signed-off-by: karo <[email protected]>
@The127 The127 marked this pull request as ready for review April 28, 2025 09:45
@The127 The127 requested a review from stgraber as a code owner April 28, 2025 09:45
@stgraber stgraber enabled auto-merge April 28, 2025 23:59
@stgraber stgraber merged commit 2ccd7f1 into lxc:main Apr 29, 2025
38 checks passed
@The127 The127 deleted the incusd-api-internal-unreachable-code branch April 29, 2025 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants