naccyde / rpms / systemd

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