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

Submitted by Stanislav Kinsburskiy on Dec. 20, 2017, 4:07 p.m.

Details

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

Commit Message

Stanislav Kinsburskiy Dec. 20, 2017, 4:07 p.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 c202b14..be3bca4 100644
--- a/criu/spfs.c
+++ b/criu/spfs.c
@@ -338,16 +338,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)