+ /* if this is the first element */
+ list->start=(t_list_element *)malloc(sizeof(t_list_element));
+ if(list->start==NULL) {
+ dprintf(list->outfd,"[list] unable to allocate list element memory\n");
+ return L_E_MEM;
+ }
+ if((list->start->data=malloc(data_len))==NULL) {
+ dprintf(list->outfd,"[list] unable to allocate data memory\n");
+ return L_E_MEM;
+ }
+ memcpy(list->start->data,data,data_len);
+ list->start->data_len=data_len;
+ list->start->next=NULL;
+ list->start->prev=NULL;
+
+ dprintf(list->outfd,"[list] added initial element\n");
+
+ return L_SUCCESS;