(mu_iterator_detach): Bugfix.
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -35,7 +35,7 @@ mu_iterator_create (mu_iterator_t *piterator, void *owner) | ... | @@ -35,7 +35,7 @@ mu_iterator_create (mu_iterator_t *piterator, void *owner) |
35 | return MU_ERR_OUT_PTR_NULL; | 35 | return MU_ERR_OUT_PTR_NULL; |
36 | if (owner == NULL) | 36 | if (owner == NULL) |
37 | return EINVAL; | 37 | return EINVAL; |
38 | iterator = calloc (sizeof (*iterator), 1); | 38 | iterator = calloc (1, sizeof (*iterator)); |
39 | if (iterator == NULL) | 39 | if (iterator == NULL) |
40 | return ENOMEM; | 40 | return ENOMEM; |
41 | iterator->owner = owner; | 41 | iterator->owner = owner; |
... | @@ -239,7 +239,7 @@ mu_iterator_detach (mu_iterator_t *root, mu_iterator_t iterator) | ... | @@ -239,7 +239,7 @@ mu_iterator_detach (mu_iterator_t *root, mu_iterator_t iterator) |
239 | if (itr) | 239 | if (itr) |
240 | { | 240 | { |
241 | if (prev) | 241 | if (prev) |
242 | prev->next = itr->next; | 242 | prev->next_itr = itr->next_itr; |
243 | else | 243 | else |
244 | *root = itr->next_itr; | 244 | *root = itr->next_itr; |
245 | } | 245 | } | ... | ... |
-
Please register or sign in to post a comment