| 4015 | } |
| 4016 | |
| 4017 | hb_buffer_t* hb_buffer_list_set(hb_buffer_list_t *list, hb_buffer_t *buf) |
| 4018 | { |
| 4019 | int count = 0; |
| 4020 | int size = 0; |
| 4021 | |
| 4022 | if (list == NULL) |
| 4023 | { |
| 4024 | return NULL; |
| 4025 | } |
| 4026 | |
| 4027 | hb_buffer_t *head = list->head; |
| 4028 | hb_buffer_t *end = buf; |
| 4029 | if (end != NULL) |
| 4030 | { |
| 4031 | count++; |
| 4032 | size += end->size; |
| 4033 | while (end->next != NULL) |
| 4034 | { |
| 4035 | end = end->next; |
| 4036 | count++; |
| 4037 | size += end->size; |
| 4038 | } |
| 4039 | } |
| 4040 | list->head = buf; |
| 4041 | list->tail = end; |
| 4042 | list->count = count; |
| 4043 | list->size = size; |
| 4044 | return head; |
| 4045 | } |
| 4046 | |
| 4047 | hb_buffer_t* hb_buffer_list_clear(hb_buffer_list_t *list) |
| 4048 | { |
no outgoing calls
no test coverage detected