Make rz_analysis_op_is_call() treat op->type 's as enum values rather than bit flags (#6631)

This commit is contained in:
Naren Sirigere 2026-07-23 14:36:42 +05:30 committed by GitHub
parent cc06c1dedb
commit e49ce34306
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -979,11 +979,18 @@ RZ_API bool rz_analysis_op_is_eob(const RzAnalysisOp *op) {
*/
RZ_API bool rz_analysis_op_is_call(RZ_NONNULL const RzAnalysisOp *op) {
rz_return_val_if_fail(op, false);
if ((op->type & RZ_ANALYSIS_OP_TYPE_CALL) == RZ_ANALYSIS_OP_TYPE_CALL ||
(op->type & RZ_ANALYSIS_OP_TYPE_UCALL) == RZ_ANALYSIS_OP_TYPE_UCALL) {
switch (op->type & RZ_ANALYSIS_OP_TYPE_MASK) {
case RZ_ANALYSIS_OP_TYPE_CALL:
case RZ_ANALYSIS_OP_TYPE_UCALL:
case RZ_ANALYSIS_OP_TYPE_RCALL:
case RZ_ANALYSIS_OP_TYPE_ICALL:
case RZ_ANALYSIS_OP_TYPE_IRCALL:
case RZ_ANALYSIS_OP_TYPE_CCALL:
case RZ_ANALYSIS_OP_TYPE_UCCALL:
return true;
default:
return false;
}
return false;
}
RZ_API void rz_analysis_purge(RzAnalysis *analysis) {