[sheepdog] [PATCH] lib/sheep.c: fix return value of sd_run_sdreq()

Liu Yuan namei.unix at gmail.com
Mon May 18 05:11:13 CEST 2015


On Thu, May 14, 2015 at 03:12:35PM +0800, Yu Yang wrote:
> From: Yu Yang <yuyang at cmss.chinamobile.com>
> 
> The return value should be SD_RES_XXX, so return SD_RES_SYSTEM_ERROR
> when sheep_submit_sdreq() failed.
> 
> Signed-off-by: Yu Yang <yuyang at cmss.chinamobile.com>
> ---
>  lib/shared/sheep.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/shared/sheep.c b/lib/shared/sheep.c
> index 933be07..a632162 100644
> --- a/lib/shared/sheep.c
> +++ b/lib/shared/sheep.c
> @@ -86,7 +86,7 @@ int sd_run_sdreq(struct sd_cluster *c, struct sd_req *hdr, void *data)
>  
>  	ret = sheep_submit_sdreq(c, hdr, data, wlen);
>  	if (ret < 0)
> -		return ret;
> +		return SD_RES_SYSTEM_ERROR;
>  
>  	ret = xread(c->sockfd, rsp, sizeof(*rsp));
>  	if (ret < 0)
> -- 
> 1.7.9.5
> 
> 
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/sheepdog

Applied, thanks.

Yuan


More information about the sheepdog mailing list