TS-5008 CID 1022007 Logically dead code #1149
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.
The first "if (in_ext_map)" and if (ret) return ret; causes the following code if (in_ext_map) to never execute. Modified to clean it up.
if (in_ext_map) {
612 ret = true;
613 }
614
615 if (ret) {
616 return ret;
617 }
618
619 if (ink_hash_table_lookup(our_map, virt_ip, &hash_value) != 0) {
const: At condition in_ext_map, the value of in_ext_map must be equal to 0.
dead_error_condition: The condition in_ext_map cannot be true.
620 if (in_ext_map) {
CID 1022007 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: ret = true;.
621 ret = true;
622 } else {
623 ret = false;
624 }
625 }