[Sheepdog] [PATCH 6/7] sheep: fix uninitialize variable

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Aug 4 10:41:00 CEST 2011


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/vdi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sheep/vdi.c b/sheep/vdi.c
index 4291416..1d2c5e1 100644
--- a/sheep/vdi.c
+++ b/sheep/vdi.c
@@ -289,7 +289,7 @@ int add_vdi(uint32_t epoch, char *data, int data_len, uint64_t size,
 	    uint32_t *new_vid, uint32_t base_vid, uint32_t copies,
 	    int is_snapshot, unsigned int *nr_copies)
 {
-	uint32_t cur_vid;
+	uint32_t cur_vid = 0;
 	uint32_t next_snapid;
 	unsigned long nr, deleted_nr = SD_NR_VDIS, right_nr = SD_NR_VDIS;
 	int ret;
-- 
1.7.2.5




More information about the sheepdog mailing list