list_reset(list);
- while(list->current!=NULL) {
- if(first_bytes<=list->current->data_len)
- if(!(memcmp(list->current->data,data,first_bytes))) return L_SUCCESS;
- list_next(list);
- }
+ do {
+ if(list->current!=NULL)
+ if(first_bytes<=list->current->data_len)
+ if(!(memcmp(list->current->data,data,first_bytes))) return L_SUCCESS;
+ } while(list_next(list)!=L_NO_NEXT_ELEMENT);
return L_NO_SUCH_ELEMENT;
}