Search resolved_calls for a match where caller contains callerSub * and callee contains calleeSub. Returns index or -1. */
| 25 | /* Search resolved_calls for a match where caller contains callerSub |
| 26 | * and callee contains calleeSub. Returns index or -1. */ |
| 27 | static int find_resolved(const CBMFileResult *r, const char *callerSub, const char *calleeSub) { |
| 28 | for (int i = 0; i < r->resolved_calls.count; i++) { |
| 29 | const CBMResolvedCall *rc = &r->resolved_calls.items[i]; |
| 30 | if (rc->caller_qn && strstr(rc->caller_qn, callerSub) && rc->callee_qn && |
| 31 | strstr(rc->callee_qn, calleeSub)) |
| 32 | return i; |
| 33 | } |
| 34 | return -1; |
| 35 | } |
| 36 | |
| 37 | /* Assert that a resolved call exists. Returns the index. */ |
| 38 | static int require_resolved(const CBMFileResult *r, const char *callerSub, const char *calleeSub) { |
no outgoing calls
no test coverage detected