* Is the list empty? * * An empty list has either its first 'next' pointer set to NULL, or to itself. */
| 286 | * An empty list has either its first 'next' pointer set to NULL, or to itself. |
| 287 | */ |
| 288 | static inline bool |
| 289 | dlist_is_empty(dlist_head *head) |
| 290 | { |
| 291 | dlist_check(head); |
| 292 | |
| 293 | return head->head.next == NULL || head->head.next == &(head->head); |
| 294 | } |
| 295 | |
| 296 | /* |
| 297 | * Insert a node at the beginning of the list. |
no test coverage detected