ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
Blob Blame History Raw
From d61f36a7ef07c252b49cc8015fe37b69bffb1a35 Mon Sep 17 00:00:00 2001
From: Stefan Beller <stefanbeller@googlemail.com>
Date: Fri, 3 Jan 2014 20:33:20 +0100
Subject: [PATCH] swap: remove if/else with the same data path

This was introduced in e1770af812 (2012-02-03, swap: replace failure
boolean by result enum).

This just removes unneeded lines of code, no functional change.
---
 src/core/swap.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/core/swap.c b/src/core/swap.c
index f295b65..727bb95 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -959,10 +959,7 @@ static void swap_sigchld_event(Unit *u, pid_t pid, int code, int status) {
         case SWAP_DEACTIVATING_SIGKILL:
         case SWAP_DEACTIVATING_SIGTERM:
 
-                if (f == SWAP_SUCCESS)
-                        swap_enter_dead(s, f);
-                else
-                        swap_enter_dead(s, f);
+                swap_enter_dead(s, f);
                 break;
 
         default: