Skip to content

Commit 3c49f3b

Browse files
committed
WHO IS THE SPEEDUP KING??? -- (fixing his own bugs..)
1 parent f770cd2 commit 3c49f3b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/journal.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
List_node *insert_start(List_t *l_info, JournalRecord_t* d) {
88
List_node *n = malloc(sizeof(List_node));
99
ALLOCATION_ERROR(n);
10-
JournalRecord_t* new_d = copyJournalRecord(d);
10+
// JournalRecord_t* new_d = copyJournalRecord(d);
11+
JournalRecord_t* new_d = d;
1112
n->data = new_d;
1213
n->next = l_info->list_beg;
1314
n->prev = NULL;
@@ -23,7 +24,7 @@ List_node *insert_start(List_t *l_info, JournalRecord_t* d) {
2324
void insert_end(List_t *l_info, JournalRecord_t* d) {
2425
List_node *n = malloc(sizeof(List_node));
2526
ALLOCATION_ERROR(n);
26-
JournalRecord_t* new_d = copyJournalRecord(d);
27+
JournalRecord_t* new_d = d;
2728
n->data = new_d;
2829
n->next = NULL;
2930
n->prev = l_info->list_end;
@@ -37,8 +38,6 @@ void insert_end(List_t *l_info, JournalRecord_t* d) {
3738

3839
void remove_end(List_t *l_info) {
3940
List_node *n = l_info->list_end;
40-
destroyJournalRecord(n->data);
41-
free(n->data);
4241
if (n->prev == NULL)
4342
l_info->list_beg = n->next;
4443
else

0 commit comments

Comments
 (0)