[sheepdog] [PATCH] Sheep: Merge two "for loops" into one

Hitoshi Mitake mitake.hitoshi at gmail.com
Thu Jun 25 15:52:56 CEST 2015


At Thu, 25 Jun 2015 11:40:38 +0800,
Ziye Yang wrote:
> 
> This patch is just used to merge the two "for loops" into one
> 
> Signed-off-by: Ziye Yang <ziye.yang at intel.com>
> ---
>  sheep/recovery.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.
Hitoshi

> 
> diff --git a/sheep/recovery.c b/sheep/recovery.c
> index 12a293a..56328dc 100644
> --- a/sheep/recovery.c
> +++ b/sheep/recovery.c
> @@ -444,10 +444,10 @@ static void *rebuild_erasure_object(uint64_t oid, uint8_t idx,
>  	uint8_t *bufs[ed];
>  	int idxs[ed];
>  
> -	for (i = 0; i < ed; i++)
> +	for (i = 0; i < ed; i++) {
>  		bufs[i] = NULL;
> -	for (i = 0; i < ed; i++)
>  		idxs[i] = 0;
> +	}
>  
>  	/* Prepare replica */
>  	for (i = 0, j = 0; i < edp && j < ed; i++) {
> 
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/sheepdog


More information about the sheepdog mailing list