summaryrefslogtreecommitdiff
path: root/xs_set.h
diff options
context:
space:
mode:
Diffstat (limited to 'xs_set.h')
-rw-r--r--xs_set.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/xs_set.h b/xs_set.h
index 12bac94..d320d34 100644
--- a/xs_set.h
+++ b/xs_set.h
@@ -85,7 +85,6 @@ int xs_set_add(xs_set *s, const xs_val *data)
{
/* is it 'full'? */
if (s->used >= s->elems / 2) {
- char *p;
const xs_val *v;
/* expand! */
@@ -96,8 +95,8 @@ int xs_set_add(xs_set *s, const xs_val *data)
memset(s->hash, '\0', s->elems * sizeof(int));
/* add the list elements back */
- p = s->list;
- while (xs_list_iter(&p, &v))
+ int ct = 0;
+ while (xs_list_next(s->list, &v, &ct))
_store_hash(s, v, v - s->list);
}