Skip to content

Commit

Permalink
Use RzList methods instead of direct use of RzListIter members
Browse files Browse the repository at this point in the history
* use Rzlist methods.
* Fix callables test
  • Loading branch information
treseco authored Dec 25, 2023
1 parent 10f0359 commit 3741188
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/RizinUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ typedef struct rz_list_iter_t RzListIter;

template<typename T, typename F> 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<T *>(it->data));
func(reinterpret_cast<T *>(rz_list_iter_get_data(it)));
}
}

Expand Down
3 changes: 0 additions & 3 deletions test/db/extras/ghidra
Original file line number Diff line number Diff line change
Expand Up @@ -3138,13 +3138,10 @@ pdg
EOF
EXPECT=<<EOF

// WARNING: Variable defined which should be unmapped: var_30h

jstring sym.Java_JNIFoo_nativeFoo(JNIEnv *env, jobject obj)
{
int64_t iVar1;
jstring pvVar2;
int64_t var_30h;

iVar1 = sym.imp.malloc(0x1e);
if (iVar1 == 0) {
Expand Down

0 comments on commit 3741188

Please sign in to comment.