From: Dhaval Giani Date: Thu, 14 Aug 2008 18:20:07 +0000 (+0000) Subject: libcgroup: Fix cgroup_fill_cgc() X-Git-Tag: v0.34~236 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a492e2262ac38ca0ebdb1b1b22f24b2e3145c808;p=thirdparty%2Flibcgroup.git libcgroup: Fix cgroup_fill_cgc() We were failing on stat's success. Stupid thing to do really. Fixing that now. Signed-off-by: Dhaval Giani git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@154 4f4bb910-9a46-0410-90c8-c897d4f1cd53 --- diff --git a/api.c b/api.c index 280afcd2..0edb55bb 100644 --- a/api.c +++ b/api.c @@ -766,7 +766,7 @@ static int cgroup_fill_cgc(struct dirent *ctrl_dir, struct cgroup *cgroup, error = stat(path, &stat_buffer); - if (!error) { + if (error) { error = ECGFAIL; goto fill_error; }