LCOV - code coverage report
Current view: top level - src - subscription_list.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 13 13 100.0 %
Date: 2025-11-26 02:09:04 Functions: 2 2 100.0 %

          Line data    Source code
       1             : #include "netio.h"
       2             : 
       3          14 : void push_back_subscription(struct deferred_subscription** list, netio_tag_t tag)
       4             : {
       5          14 :     struct deferred_subscription* new_item = malloc(sizeof(struct deferred_subscription));
       6          14 :     new_item->tag = tag;
       7          14 :     new_item->next = NULL;
       8             : 
       9          14 :     if(*list == NULL){
      10          13 :         *list = new_item;
      11             :     } else {
      12             :         struct deferred_subscription* iterator  = *list;
      13           1 :         while(iterator->next){
      14             :             iterator = iterator->next;
      15             :         }
      16           1 :         iterator->next = new_item;
      17             :     }
      18          14 : }
      19             : 
      20          14 : void pop_subscription(struct deferred_subscription** list)
      21             : {
      22          14 :     if(*list == NULL) return;
      23             :     struct deferred_subscription* current_head = *list;
      24          14 :     *list = (*list)->next;
      25          14 :     free(current_head);
      26             : }
      27             : 

Generated by: LCOV version 1.0