[Sheepdog] [PATCH 9/9] shadow problem: info shadowed inside function defining shadow as local

Steven Dake sdake at redhat.com
Mon May 17 18:37:17 CEST 2010


Rename info to info_old for the scope it is accessed in.

Signed-off-by: Steven Dake <sdake at redhat.com>
---
 collie/collie.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/collie/collie.c b/collie/collie.c
index d9f26fc..38eb071 100644
--- a/collie/collie.c
+++ b/collie/collie.c
@@ -745,25 +745,25 @@ static int vdi_object(int argc, char **argv)
 		       vid, nr_nodes);
 		parse_objs(vid_to_vdi_oid(vid), do_print_obj, NULL);
 	} else {
-		struct get_data_oid_info info;
+		struct get_data_oid_info old_info;
 
-		info.success = 0;
-		info.idx = idx;
+		old_info.success = 0;
+		old_info.idx = idx;
 
 		if (idx >= MAX_DATA_OBJS) {
 			printf("The offset is too large!\n");
 			exit(1);
 		}
 
-		parse_objs(vid_to_vdi_oid(vid), get_data_oid, &info);
+		parse_objs(vid_to_vdi_oid(vid), get_data_oid, &old_info);
 
-		if (info.success) {
-			if (info.data_oid) {
+		if (old_info.success) {
+			if (old_info.data_oid) {
 				printf("Looking for the object 0x%" PRIx64
 				       " (the inode vid 0x%" PRIx32 " idx %u) with %d nodes\n\n",
-				       info.data_oid, vid, idx, nr_nodes);
+				       old_info.data_oid, vid, idx, nr_nodes);
 
-				parse_objs(info.data_oid, do_print_obj, NULL);
+				parse_objs(old_info.data_oid, do_print_obj, NULL);
 			} else
 				printf("The inode object 0x%" PRIx32 " idx %u is not allocated\n",
 				       vid, idx);
-- 
1.6.2.5




More information about the sheepdog mailing list