Use add-sorted instead of append+sort ##anal

This commit is contained in:
radare 2018-12-31 00:22:33 +01:00 committed by GitHub
parent 2eb706029c
commit acc7a2543d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -775,8 +775,7 @@ static int core_anal_fcn(RCore *core, ut64 at, ut64 from, int reftype, int depth
if (!f->fcn_locs) {
f->fcn_locs = r_list_new ();
}
r_list_append (f->fcn_locs, fcn);
r_list_sort (f->fcn_locs, &cmpfcn);
r_list_add_sorted (f->fcn_locs, fcn, &cmpfcn);
}
}
r_anal_xrefs_set (core->anal, from, fcn->addr, reftype);