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

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Wed Dec 20 19:07:01 MSK 2017


Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 criu/spfs.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

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)



More information about the Devel mailing list