From: Kazuhito Hagio <k-hagio...@nec.com>

While the return value of do_radix_tree() and do_xarray() does not
contain NULL entries, do_maple_tree()'s one contains NULL entries.

Make this behavior consistent with the previous tree functions to make
replacement easier, especially for the following patch.

Signed-off-by: Kazuhito Hagio <k-hagio...@nec.com>

---
 maple_tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/maple_tree.c b/maple_tree.c
index 807c17f7dfa0..eccd273105a6 100644
--- a/maple_tree.c
+++ b/maple_tree.c
@@ -287,7 +287,7 @@ static void do_mt_entry(ulong entry, ulong min, ulong max, 
uint depth,
        static struct req_entry **e = NULL;
        struct tree_data *td = ops->is_td ? (struct tree_data *)ops->private : 
NULL;
 
-       if (ops->entry)
+       if (ops->entry && entry)
                ops->entry(entry, entry, path, max, ops->private);
 
        if (!td)
-- 
2.31.1

--
Crash-utility mailing list
Crash-utility@redhat.com
https://listman.redhat.com/mailman/listinfo/crash-utility
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

Reply via email to