projects
/
my-code
/
api.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46249e0
)
point to added list element in case after adding an element
author
hackbard
<hackbard>
Fri, 10 Jun 2005 16:06:55 +0000
(16:06 +0000)
committer
hackbard
<hackbard>
Fri, 10 Jun 2005 16:06:55 +0000
(16:06 +0000)
list/list.c
patch
|
blob
|
history
diff --git
a/list/list.c
b/list/list.c
index
0cfb441
..
64a104a
100644
(file)
--- a/
list/list.c
+++ b/
list/list.c
@@
-123,6
+123,8
@@
int list_add_element(t_list *list,void *data,int data_len) {
memcpy(list->current->next->data,data,data_len);
list->current->next->data_len=data_len;
+ list->current=list->current->next;
+
dprintf(list->outfd,"[list] element added\n");
return L_SUCCESS;
@@
-145,6
+147,8
@@
int list_add_element(t_list *list,void *data,int data_len) {
list->start->next=NULL;
list->start->prev=NULL;
+ list->current=list->start;
+
dprintf(list->outfd,"[list] added initial element\n");
return L_SUCCESS;