Count resolved calls matching pattern */
| 51 | |
| 52 | /* Count resolved calls matching pattern */ |
| 53 | static int count_resolved(const CBMFileResult *r, const char *callerSub, const char *calleeSub) { |
| 54 | int n = 0; |
| 55 | for (int i = 0; i < r->resolved_calls.count; i++) { |
| 56 | const CBMResolvedCall *rc = &r->resolved_calls.items[i]; |
| 57 | if (rc->caller_qn && strstr(rc->caller_qn, callerSub) && rc->callee_qn && |
| 58 | strstr(rc->callee_qn, calleeSub)) |
| 59 | n++; |
| 60 | } |
| 61 | return n; |
| 62 | } |
| 63 | |
| 64 | /* Search cross-file resolved calls array */ |
| 65 | static int find_resolved_arr(const CBMResolvedCallArray *arr, const char *callerSub, |