Skip to contentSkip to conversation

master - libdm: pass dnode to callback

PATCH Zdenek Kabelac 1 participant 1 message Jan 8, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=af7297c73eb824f30898ba7dbb4a4b23406625ca
Commit:        af7297c73eb824f30898ba7dbb4a4b23406625ca
Parent:        95b1af72803336f8a2e559bae4eadefff9a48a7a
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Wed Jan 8 10:30:25 2014 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Wed Jan 8 11:57:43 2014 +0100

libdm: pass dnode to callback

Pass dnode pointer instead of rather unknown child pointer. The pointer is currently unused and passing child pointer is quite undefined, while dnode has at least some usability.

---
 libdm/libdm-deptree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
libdm/libdm-deptree.c +1 -1
index 752a44b..7bc1f33 100644
@@ -2619,7 +2619,7 @@ int dm_tree_preload_children(struct dm_tree_node *dnode,
 		dm_tree_set_cookie(dnode, 0);
 
 		if (!dnode->info.exists && dnode->callback &&
-		    !dnode->callback(child, DM_NODE_CALLBACK_PRELOADED,
+		    !dnode->callback(dnode, DM_NODE_CALLBACK_PRELOADED,
 				     dnode->callback_data))
 			return_0;
 	}