[ltt-dev] [UST PATCH] Correct error handling and add error message in ustcmd.c

Mathieu Desnoyers compudj at krystal.dyndns.org
Sat Sep 11 11:00:23 EDT 2010


* Nils Carlson (nils.carlson at ericsson.com) wrote:
> 
> Signed-off-by: Nils Carlson <nils.carlson at ericsson.com>

David, Nils, please double-check that you are not fixing the same
problem twice with slightly different patches. I think I've seen this
one recently.

Thanks,

Mathieu


> ---
>  libustcmd/ustcmd.c |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)
> 
> diff --git a/libustcmd/ustcmd.c b/libustcmd/ustcmd.c
> index 4248072..c512320 100644
> --- a/libustcmd/ustcmd.c
> +++ b/libustcmd/ustcmd.c
> @@ -396,10 +396,6 @@ int ustcmd_get_cmsf(struct marker_status **cmsf, const pid_t pid)
>  	}
>  	result = ustcmd_send_cmd("list_markers", pid, &big_str);
>  	if (result != 1) {
> -		return -1;
> -	}
> -
> -	if (result != 1) {
>  		ERR("error while getting markers list");
>  		return -1;
>  	}
> @@ -407,6 +403,7 @@ int ustcmd_get_cmsf(struct marker_status **cmsf, const pid_t pid)
>  	tmp_cmsf = (struct marker_status *) malloc(sizeof(struct marker_status) *
>  		(ustcmd_count_nl(big_str) + 1));
>  	if (tmp_cmsf == NULL) {
> +		ERR("Failed to allocate CMSF array");
>  		return -1;
>  	}
>  
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




More information about the lttng-dev mailing list