daandemeyer / rpms / systemd

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