diff options
Diffstat (limited to 'xs_set.h')
| -rw-r--r-- | xs_set.h | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -85,7 +85,6 @@ int xs_set_add(xs_set *s, const xs_val *data) | |||
| 85 | { | 85 | { |
| 86 | /* is it 'full'? */ | 86 | /* is it 'full'? */ |
| 87 | if (s->used >= s->elems / 2) { | 87 | if (s->used >= s->elems / 2) { |
| 88 | char *p; | ||
| 89 | const xs_val *v; | 88 | const xs_val *v; |
| 90 | 89 | ||
| 91 | /* expand! */ | 90 | /* expand! */ |
| @@ -96,8 +95,8 @@ int xs_set_add(xs_set *s, const xs_val *data) | |||
| 96 | memset(s->hash, '\0', s->elems * sizeof(int)); | 95 | memset(s->hash, '\0', s->elems * sizeof(int)); |
| 97 | 96 | ||
| 98 | /* add the list elements back */ | 97 | /* add the list elements back */ |
| 99 | p = s->list; | 98 | int ct = 0; |
| 100 | while (xs_list_iter(&p, &v)) | 99 | while (xs_list_next(s->list, &v, &ct)) |
| 101 | _store_hash(s, v, v - s->list); | 100 | _store_hash(s, v, v - s->list); |
| 102 | } | 101 | } |
| 103 | 102 | ||