From bf82389de36ef940be3640229f5a68d0e9211b71 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Wed, 26 Nov 2025 07:48:02 +0000 Subject: [PATCH] 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 --- criu/cr-dump.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/criu/cr-dump.c b/criu/cr-dump.c index 4df40e9b6..98b4223ba 100644 --- a/criu/cr-dump.c +++ b/criu/cr-dump.c @@ -2329,8 +2329,6 @@ int cr_dump_tasks(pid_t pid) } ret = write_img_inventory(&he); - if (ret) - goto err; err: if (parent_ie) inventory_entry__free_unpacked(parent_ie, NULL);