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:
d06f685
)
another bugfix
author
hackbard
<hackbard>
Mon, 8 Nov 2004 12:16:12 +0000
(12:16 +0000)
committer
hackbard
<hackbard>
Mon, 8 Nov 2004 12:16:12 +0000
(12:16 +0000)
list/list.c
patch
|
blob
|
history
diff --git
a/list/list.c
b/list/list.c
index
a64997f
..
13493e6
100644
(file)
--- a/
list/list.c
+++ b/
list/list.c
@@
-83,11
+83,11
@@
int list_search_data(t_list *list,void *data,int first_bytes) {
list_reset(list);
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;
}
return L_NO_SUCH_ELEMENT;
}