Returns the graph with the specified @a name or NULL if no graph is found.
| 485 | |
| 486 | /// Returns the graph with the specified @a name or NULL if no graph is found. |
| 487 | Graph *find(ListNode &head, const char *name) |
| 488 | { |
| 489 | ListNode *cur; |
| 490 | list_for_each(cur, &head) |
| 491 | { |
| 492 | Graph *graph = (Graph *)container_of(cur, Graph, _node); |
| 493 | if (graph->_name == name) |
| 494 | return graph; |
| 495 | } |
| 496 | |
| 497 | return NULL; |
| 498 | } |
| 499 | |
| 500 | } // namespace graph |
| 501 |
no outgoing calls
no test coverage detected