From 3741188321ca453bcfd7b32bd26014943682bc77 Mon Sep 17 00:00:00 2001 From: ct <122410995+treseco@users.noreply.github.com> Date: Mon, 25 Dec 2023 07:42:09 -0500 Subject: [PATCH] Use RzList methods instead of direct use of RzListIter members * use Rzlist methods. * Fix callables test --- src/RizinUtils.h | 4 ++-- test/db/extras/ghidra | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/RizinUtils.h b/src/RizinUtils.h index 75d1ef65..cd4e48ee 100644 --- a/src/RizinUtils.h +++ b/src/RizinUtils.h @@ -11,9 +11,9 @@ typedef struct rz_list_iter_t RzListIter; template void rz_list_foreach_cpp(RzList *list, const F &func) { - for(RzListIter *it = list->head; it; it = it->n) + for(RzListIter *it = list->head; it; it = rz_list_iter_get_next(it)) { - func(reinterpret_cast(it->data)); + func(reinterpret_cast(rz_list_iter_get_data(it))); } } diff --git a/test/db/extras/ghidra b/test/db/extras/ghidra index bb3c1877..50891677 100644 --- a/test/db/extras/ghidra +++ b/test/db/extras/ghidra @@ -3138,13 +3138,10 @@ pdg EOF EXPECT=<