a52f674
From 753aeaee0bdaecf804e6c750051fe094f03b9c84 Mon Sep 17 00:00:00 2001
b12ff75
From: Stefan Beller <stefanbeller@googlemail.com>
b12ff75
Date: Fri, 3 Jan 2014 20:33:20 +0100
b12ff75
Subject: [PATCH] swap: remove if/else with the same data path
b12ff75
b12ff75
This was introduced in e1770af812 (2012-02-03, swap: replace failure
b12ff75
boolean by result enum).
b12ff75
b12ff75
This just removes unneeded lines of code, no functional change.
a52f674
a52f674
(cherry picked from commit 7bb01eff62aa7b612e33fe0e512a4d97862050c4)
b12ff75
---
b12ff75
 src/core/swap.c | 5 +----
b12ff75
 1 file changed, 1 insertion(+), 4 deletions(-)
b12ff75
b12ff75
diff --git a/src/core/swap.c b/src/core/swap.c
b12ff75
index f295b65..727bb95 100644
b12ff75
--- a/src/core/swap.c
b12ff75
+++ b/src/core/swap.c
b12ff75
@@ -959,10 +959,7 @@ static void swap_sigchld_event(Unit *u, pid_t pid, int code, int status) {
b12ff75
         case SWAP_DEACTIVATING_SIGKILL:
b12ff75
         case SWAP_DEACTIVATING_SIGTERM:
b12ff75
 
b12ff75
-                if (f == SWAP_SUCCESS)
b12ff75
-                        swap_enter_dead(s, f);
b12ff75
-                else
b12ff75
-                        swap_enter_dead(s, f);
b12ff75
+                swap_enter_dead(s, f);
b12ff75
                 break;
b12ff75
 
b12ff75
         default: