[v2,3/7] spfs: remove redundant spfs_service_fd() helper

Submitted by Stanislav Kinsburskiy on Dec. 21, 2017, 11:07 a.m.

Details

Message ID 20171221110708.1002189.43253.stgit@skinsbursky-vz7.qa.sw.ru
State New
Series "spfs: duplicate socket before sending it from usernsd"
Headers show

Commit Message

Stanislav Kinsburskiy Dec. 21, 2017, 11:07 a.m.
Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
---
 criu/spfs.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/spfs.c b/criu/spfs.c
index 1ead01b..223bf93 100644
--- a/criu/spfs.c
+++ b/criu/spfs.c
@@ -336,16 +336,9 @@  int spfs_set_env(void)
 	return 0;
 }
 
-static int spfs_service_fd(void *arg, int fd, pid_t pid)
-{
-	return get_service_fd(SPFS_MNGR_SK);
-}
-
 static int spfs_service_is_active(void *arg, int fd, pid_t pid)
 {
-	if (spfs_service_fd(arg, fd, pid) < 0)
-		return 0;
-	return 1;
+	return get_service_fd(SPFS_MNGR_SK) < 0 ? 0 : 1;
 }
 
 int spfs_mngr_status(bool *active)