[sheepdog] [PATCH] sheep: remove useless type casting

Liu Yuan namei.unix at gmail.com
Tue May 22 04:51:01 CEST 2012


On 05/21/2012 11:47 PM, Liu Yuan wrote:

> From: Liu Yuan <tailai.ly at taobao.com>
> 
> 
> Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> ---
>  sheep/object_cache.c |    2 +-
>  sheep/ops.c          |    2 +-
>  sheep/recovery.c     |    2 +-
>  sheep/store.c        |    2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/sheep/object_cache.c b/sheep/object_cache.c
> index efd815f..2711598 100644
> --- a/sheep/object_cache.c
> +++ b/sheep/object_cache.c
> @@ -468,7 +468,7 @@ pull_remote:
>  		if (fd < 0)
>  			continue;
>  
> -		ret = exec_req(fd, (struct sd_req *)&hdr, buf, &wlen, &rlen);
> +		ret = exec_req(fd, &hdr, buf, &wlen, &rlen);
>  		if (ret) { /* network errors */
>  			del_sheep_fd(fd);
>  			ret = SD_RES_NETWORK_ERROR;
> diff --git a/sheep/ops.c b/sheep/ops.c
> index b4df70f..dfd0532 100644
> --- a/sheep/ops.c
> +++ b/sheep/ops.c
> @@ -674,7 +674,7 @@ static int read_copy_from_replica(struct request *req, uint32_t epoch,
>  		hdr.obj.oid = oid;
>  		hdr.obj.offset = 0;
>  
> -		ret = exec_req(fd, (struct sd_req *)&hdr, buf, &wlen, &rlen);
> +		ret = exec_req(fd, &hdr, buf, &wlen, &rlen);
>  
>  		close(fd);
>  
> diff --git a/sheep/recovery.c b/sheep/recovery.c
> index e31f226..74b45e4 100644
> --- a/sheep/recovery.c
> +++ b/sheep/recovery.c
> @@ -248,7 +248,7 @@ static int recover_object_from_replica(uint64_t oid,
>  	hdr.obj.oid = oid;
>  	hdr.obj.tgt_epoch = tgt_epoch;
>  
> -	ret = exec_req(fd, (struct sd_req *)&hdr, buf, &wlen, &rlen);
> +	ret = exec_req(fd, &hdr, buf, &wlen, &rlen);
>  
>  	close(fd);
>  
> diff --git a/sheep/store.c b/sheep/store.c
> index 80cfb72..0e0209e 100644
> --- a/sheep/store.c
> +++ b/sheep/store.c
> @@ -477,7 +477,7 @@ int epoch_log_read_remote(uint32_t epoch, char *buf, int len)
>  
>  		wlen = 0;
>  
> -		ret = exec_req(fd, (struct sd_req *)&hdr, buf, &wlen, &rlen);
> +		ret = exec_req(fd, &hdr, buf, &wlen, &rlen);
>  		close(fd);
>  
>  		if (ret)


Applied.

Thanks,
Yuan



More information about the sheepdog mailing list