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