| 1739 | } |
| 1740 | |
| 1741 | int flist_ndx_pop(flist_ndx_list *lp) |
| 1742 | { |
| 1743 | struct flist_ndx_item *next; |
| 1744 | int ndx; |
| 1745 | |
| 1746 | if (!lp->head) |
| 1747 | return -1; |
| 1748 | |
| 1749 | ndx = lp->head->ndx; |
| 1750 | next = lp->head->next; |
| 1751 | free(lp->head); |
| 1752 | lp->head = next; |
| 1753 | if (!next) |
| 1754 | lp->tail = NULL; |
| 1755 | |
| 1756 | return ndx; |
| 1757 | } |
| 1758 | |
| 1759 | /* Make sure there is room for one more item in the item list. If there |
| 1760 | * is not, expand the list as indicated by the value of "incr": |
no outgoing calls
no test coverage detected