Commit aec56b2b authored by David Brown's avatar David Brown Committed by David Brown
Browse files

sim: Combine a split conditional



Instead of nesting ifs, just use the conditional with an and operator.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent 8973f555
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -512,14 +512,12 @@ impl Images {
                fails += 1;
            }

            if self.is_swap_upgrade() {
                if !self.verify_images(&flash, 1, 0) {
            if self.is_swap_upgrade() && !self.verify_images(&flash, 1, 0) {
                warn!("Secondary slot FAIL at step {} of {}",
                    i, total_flash_ops);
                fails += 1;
            }
        }
        }

        if fails > 0 {
            error!("{} out of {} failed {:.2}%", fails, total_flash_ops,