aboutsummaryrefslogtreecommitdiff
path: root/ll.c
blob: 3481b8beafd07fa6ab14a74ef9c01139bd65981c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdlib.h>
#include <assert.h>
#include "ll.h"

llnode* appendll(llnode* tail, /*@nottemp@*/char* str){
    llnode* new = malloc(sizeof(llnode));
    assert(new != NULL);
    if (tail != NULL) {
        assert(tail->next == NULL);
        tail->next = new;
    }
    new->str = str;
    new->next = NULL;
    return new;
}