On Wed, Aug 24, 2011 at 4:39 AM, Jan Safranek <jsafr...@redhat.com> wrote:
> The function should return an error when (and only when) something goes
> wrong.
>
> Signed-off-by: Jan Safranek <jsafr...@redhat.com>

Acked-by: Dhaval Giani <dhaval.gi...@gmail.com>

> ---
>
>  src/tools/cgsnapshot.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/tools/cgsnapshot.c b/src/tools/cgsnapshot.c
> index 404d54a..1247488 100644
> --- a/src/tools/cgsnapshot.c
> +++ b/src/tools/cgsnapshot.c
> @@ -626,7 +626,7 @@ static int show_mountpoints(const char *controller)
>  static int parse_mountpoints(cont_name_t cont_names[CG_CONTROLLER_MAX],
>        const char *program_name)
>  {
> -       int ret, final_ret;
> +       int ret, final_ret = 0;
>        void *handle;
>        struct controller_data info;
>        struct cgroup_mount_point mount;
> @@ -660,9 +660,9 @@ static int parse_mountpoints(cont_name_t 
> cont_names[CG_CONTROLLER_MAX],
>                                cgroup_strerror(ret));
>                        return ret;
>                }
> +               final_ret = ret;
>        }
>
> -       final_ret = ret;
>        cgroup_get_all_controller_end(&handle);
>
>        /* process also named hierarchies */
> @@ -688,7 +688,7 @@ static int parse_mountpoints(cont_name_t 
> cont_names[CG_CONTROLLER_MAX],
>
>        /* finish mount section */
>        fprintf(of, "}\n\n");
> -       return ret;
> +       return final_ret;
>  }
>
>  int main(int argc, char *argv[])
>
>
> ------------------------------------------------------------------------------
> 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

Reply via email to