Re: [PATCH] Remove unchecked return problem in test code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Jan Friesse <jfriesse@xxxxxxxxxx>

Steven Dake wrote:
> Signed-off-by: Steven Dake <sdake@xxxxxxxxxx>
> ---
>  test/testsam.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/test/testsam.c b/test/testsam.c
> index 28bc7dc..6b511a2 100644
> --- a/test/testsam.c
> +++ b/test/testsam.c
> @@ -531,9 +531,12 @@ static int test4 (void)
>  
>  static int test5_hc_cb (void)
>  {
> +	cs_error_t res;
>  	printf ("%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;

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux