From 289d83c35b855cd9a000c03d17379d5973ad8f02 Mon Sep 17 00:00:00 2001 From: Dhaval Giani Date: Tue, 16 Nov 2010 14:29:50 +0100 Subject: [PATCH] v2 [patch 5/6] api: Remove unnecessary check Steve Grubb pointed out at http://article.gmane.org/gmane.comp.lib.libcg.devel/2485 that the additional check for EOF is unneeded since EOF != 3. Remove this check Reported-by: Steve Grubb Signed-off-by: Dhaval Giani Acked-By: Jan Safranek --- src/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api.c b/src/api.c index 9f231218..e34c928e 100644 --- a/src/api.c +++ b/src/api.c @@ -2652,7 +2652,7 @@ int cgroup_get_current_controller_path(pid_t pid, const char *controller, * my daily life, I need some magic to help make them * disappear :) */ - if (ret != 3 || ret == EOF) { + if (ret != 3) { cgroup_dbg("read failed for pid_cgroup_fd ret %d\n", ret); last_errno = errno; -- 2.47.2