On Wed, Aug 24, 2011 at 4:39 AM, Jan Safranek <jsafr...@redhat.com> wrote: > As found by coverity scan, cgroup_init result is not checked in some tests. > > Signed-off-by: Jan Safranek <jsafr...@redhat.com>
Acked-by: Dhaval Giani <dhaval.gi...@gmail.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); > > > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > _______________________________________________ > Libcg-devel mailing list > Libcg-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libcg-devel > ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel