summaryrefslogtreecommitdiff
path: root/src/sp_list.c
diff options
context:
space:
mode:
authorjvoisin2017-10-09 11:54:11 +0200
committerGitHub2017-10-09 11:54:11 +0200
commit7234fdbb0cb0dd45ed1d6e7814c91e596126ee25 (patch)
tree1b29ad0e25f37b55390d309fd0b7f4cd406cbb7a /src/sp_list.c
parent50bb0ed72d5c221d40f16690d980db5e7ccee46a (diff)
Implement matching on the calltrace (#17)
* Implement matching on the calltrace
Diffstat (limited to 'src/sp_list.c')
-rw-r--r--src/sp_list.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/sp_list.c b/src/sp_list.c
index 04154b7..112d822 100644
--- a/src/sp_list.c
+++ b/src/sp_list.c
@@ -35,3 +35,21 @@ void sp_list_insert(sp_node_t *list, void *data) {
35 list->next = new; 35 list->next = new;
36 } 36 }
37} 37}
38
39void sp_list_prepend(sp_node_t *list, void *data) {
40 if (list->head == NULL) {
41 list->data = data;
42 list->next = NULL;
43 list->head = list;
44 } else {
45 sp_node_t *new = pecalloc(sizeof(*new), 1, 1);
46
47 new->next = list->next;
48 list->next = new;
49
50 new->head = list;
51
52 new->data = list->data;
53 list->data = data;
54 }
55} \ No newline at end of file