As found by coverity scan, cgroup_init result is not checked in some tests.
Signed-off-by: Jan Safranek <jsafr...@redhat.com> --- tests/read_stats.c | 6 +++++- tests/walk_test.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/read_stats.c b/tests/read_stats.c index 6e61b97..a1bc244 100644 --- a/tests/read_stats.c +++ b/tests/read_stats.c @@ -49,7 +49,11 @@ int main(int argc, char *argv[]) controller = argv[1]; - cgroup_init(); + ret = cgroup_init(); + if (ret != 0) { + fprintf(stderr, "init failed\n"); + exit(EXIT_FAILURE); + } ret = cgroup_walk_tree_begin(controller, "/", 0, &handle, &info, &lvl); diff --git a/tests/walk_test.c b/tests/walk_test.c index e09f705..f3112c5 100644 --- a/tests/walk_test.c +++ b/tests/walk_test.c @@ -32,7 +32,11 @@ int main(int argc, char *argv[]) controller = argv[1]; - cgroup_init(); + ret = cgroup_init(); + if (ret != 0) { + fprintf(stderr, "Init failed\n"); + exit(EXIT_FAILURE); + } ret = cgroup_walk_tree_begin(controller, "/", 0, &handle, &info, &lvl); ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel