[corosync] [PATCH] Remove unchecked return error

Jan Friesse jfriesse at redhat.com
Tue Nov 1 15:02:01 GMT 2011


Reviewed-by: Jan Friesse <jfriesse at redhat.com>

Steven Dake wrote:
> Signed-off-by: Steven Dake <sdake at redhat.com>
> ---
>  cts/agents/sam_test_agent.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/cts/agents/sam_test_agent.c b/cts/agents/sam_test_agent.c
> index 90daae9..604cbc6 100644
> --- a/cts/agents/sam_test_agent.c
> +++ b/cts/agents/sam_test_agent.c
> @@ -496,10 +496,15 @@ static int test4 (void)
>  
>  static int test5_hc_cb (void)
>  {
> +	cs_error_t res;
> +
>  	syslog (LOG_INFO, "%s %d\n", __FUNCTION__, ++test5_hc_cb_count);
>  
> -	sam_data_store (&test5_hc_cb_count, sizeof (test5_hc_cb_count));
> +	res = sam_data_store (&test5_hc_cb_count, sizeof (test5_hc_cb_count));
>  
> +	if (res != CS_OK)
> +		return 1;
> +	
>  	if (test5_hc_cb_count > 10)
>  		return 1;
>  



More information about the discuss mailing list