* @brief Find a resource entry by type and rid. * * @param rl the resource list to search * @param type the resource entry type (e.g. SYS_RES_MEMORY) * @param rid the resource identifier * * @returns the resource entry pointer or NULL if there is no such * entry. */
| 3281 | * entry. |
| 3282 | */ |
| 3283 | struct resource_list_entry * |
| 3284 | resource_list_find(struct resource_list *rl, int type, int rid) |
| 3285 | { |
| 3286 | struct resource_list_entry *rle; |
| 3287 | |
| 3288 | STAILQ_FOREACH(rle, rl, link) { |
| 3289 | if (rle->type == type && rle->rid == rid) |
| 3290 | return (rle); |
| 3291 | } |
| 3292 | return (NULL); |
| 3293 | } |
| 3294 | |
| 3295 | /** |
| 3296 | * @brief Delete a resource entry. |
no outgoing calls
no test coverage detected