forked from cockpit-project/cockpit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly return None for value-returning functions
get_clevis_config_from_protected_header() and get_distfile() return values in some exit paths. In the default case, explicitly return `None` to point out that the caller expects a return value. Invert the conditions to move the error/default cases into the "then" blocks, and the "main case" on the top level. Spotted by CodeQL "Explicit returns mixed with implicit (fall through) returns" notes.
- Loading branch information
1 parent
0c24164
commit ab4f438
Showing
2 changed files
with
35 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters