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

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Thu Dec 21 14:07:08 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 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)



More information about the Devel mailing list