/* Add a new tail to a linked list  */
void* lv_ll_ins_tail(lv_ll_t *ll_p)
/* Add a new tail to a linked list  */
void* lv_ll_ins_tail(lv_ll_t *ll_p)
{
    lv_ll_node_t * n_new;
    n_new = lv_mem_alloc(ll_p->n_size + LL_NODE_META_SIZE);
    if(n_new == NULL) return NULL;
    if(n_new != NULL) {
        node_set_next(ll_p, n_new, NULL);
        node_set_prev(ll_p, n_new, ll_p->tail);
        if(ll_p->tail != NULL) {
            node_set_next(ll_p, ll_p->tail, n_new);
        }
        ll_p->tail = n_new;
        if(ll_p->head == NULL) {
            ll_p->head = n_new;
        }
    }
    return n_new;
}