Return the first definition with the given name, or NULL. */
| 2856 | |
| 2857 | /* Return the first definition with the given name, or NULL. */ |
| 2858 | static const CBMDefinition *find_def(CBMFileResult *r, const char *name) { |
| 2859 | for (int i = 0; i < r->defs.count; i++) { |
| 2860 | if (strcmp(r->defs.items[i].name, name) == 0) |
| 2861 | return &r->defs.items[i]; |
| 2862 | } |
| 2863 | return NULL; |
| 2864 | } |
| 2865 | |
| 2866 | TEST(complexity_nested_loops_depth) { |
| 2867 | CBMFileResult *r = extract("package p\n" |