Remove unnecessary parameter and dead code #4328
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Your checklist for this pull request
Detailed description
This is a pretty minor change, an internal function insertkeys in librz/util/sdb/src/main.c had an
int mode
parameter being matched against the 2 values'-'
and'='
. As per #489 I wanted to remove it in favor of an enum parameter, but when I searched for all the callsites using the name of the function in VSCode full-text search, I found the only callsite to be a call from main passing'-'
as an argument. Therefore, I deleted all the code except that which executes for a'-'
match, and since there was only 1 code path now, I deleted the redundant mode parameter as will....
Test plan
No tests necessary, this is a refactoring of a
static
function in a .c file with no .h, and thus it can't possibly be used in other files. Its only use in the file defining it is the call described above, which is trivially correct by inspection.The branch builds correctly, and no additional test case failures (relative to a build on the latest dev branch, where 15 tests fail on my machine in unrelated test cases) is introduced.
...
Closing issues
...