At Wed, 08 Jul 2015 15:18:55 +0800,
Ziye Yang wrote:
> 
> The coding standard is not consistent in get_store_objsize
> function.
> 
> Signed-off-by: Ziye Yang <[email protected]>
> ---
>  dog/common.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied with slight fix, thanks. I wrote a comment in the below.

> 
> diff --git a/dog/common.c b/dog/common.c
> index f699379..f11211f 100644
> --- a/dog/common.c
> +++ b/dog/common.c
> @@ -392,15 +392,15 @@ void show_progress(uint64_t done, uint64_t total, bool 
> raw)
>  size_t get_store_objsize(uint8_t copy_policy, uint8_t block_size_shift,
>                        uint64_t oid)
>  {
> +     uint32_t object_size;
> +     int d;
>       if (is_vdi_obj(oid))
>               return SD_INODE_SIZE;
>       if (is_vdi_btree_obj(oid))
>               return SD_INODE_DATA_INDEX_SIZE;
>  
> -     uint32_t object_size = (UINT32_C(1) << block_size_shift);
> +     object_size = (UINT32_C(1) << block_size_shift);
>       if (copy_policy != 0) {
> -             int d;
> -

This declaration of d is valid, so I removed the above change.

Thanks,
Hitoshi

>               ec_policy_to_dp(copy_policy, &d, NULL);
>               return object_size / d;
>       }
> 
> -- 
> sheepdog mailing list
> [email protected]
> https://lists.wpkg.org/mailman/listinfo/sheepdog
-- 
sheepdog mailing list
[email protected]
https://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to