[sheepdog] [PATCH] dog: make the coding standard consistent

Ziye Yang ziye.yang at intel.com
Wed Jul 8 09:18:55 CEST 2015


The coding standard is not consistent in get_store_objsize
function.

Signed-off-by: Ziye Yang <ziye.yang at intel.com>
---
 dog/common.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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;
-
 		ec_policy_to_dp(copy_policy, &d, NULL);
 		return object_size / d;
 	}



More information about the sheepdog mailing list