File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 7
7
List_node * insert_start (List_t * l_info , JournalRecord_t * d ) {
8
8
List_node * n = malloc (sizeof (List_node ));
9
9
ALLOCATION_ERROR (n );
10
- JournalRecord_t * new_d = copyJournalRecord (d );
10
+ // JournalRecord_t* new_d = copyJournalRecord(d);
11
+ JournalRecord_t * new_d = d ;
11
12
n -> data = new_d ;
12
13
n -> next = l_info -> list_beg ;
13
14
n -> prev = NULL ;
@@ -23,7 +24,7 @@ List_node *insert_start(List_t *l_info, JournalRecord_t* d) {
23
24
void insert_end (List_t * l_info , JournalRecord_t * d ) {
24
25
List_node * n = malloc (sizeof (List_node ));
25
26
ALLOCATION_ERROR (n );
26
- JournalRecord_t * new_d = copyJournalRecord ( d ) ;
27
+ JournalRecord_t * new_d = d ;
27
28
n -> data = new_d ;
28
29
n -> next = NULL ;
29
30
n -> prev = l_info -> list_end ;
@@ -37,8 +38,6 @@ void insert_end(List_t *l_info, JournalRecord_t* d) {
37
38
38
39
void remove_end (List_t * l_info ) {
39
40
List_node * n = l_info -> list_end ;
40
- destroyJournalRecord (n -> data );
41
- free (n -> data );
42
41
if (n -> prev == NULL )
43
42
l_info -> list_beg = n -> next ;
44
43
else
You can’t perform that action at this time.
0 commit comments