Skip to content

Commit b7aed55

Browse files
committed
dump: fix "Defect type: IDENTICAL_BRANCHES"
Static code analysis reported: criu/cr-dump.c:2328:2: identical_branches: The same code is executed when the condition "ret" is true or false, because the code in the if-then branch and after the if statement is identical. Should the if statement be removed? This is a fix for the warning. Signed-off-by: Adrian Reber <areber@redhat.com>
1 parent 2cf8f13 commit b7aed55

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

criu/cr-dump.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,8 +2329,6 @@ int cr_dump_tasks(pid_t pid)
23292329
}
23302330

23312331
ret = write_img_inventory(&he);
2332-
if (ret)
2333-
goto err;
23342332
err:
23352333
if (parent_ie)
23362334
inventory_entry__free_unpacked(parent_ie, NULL);

0 commit comments

Comments
 (0)