strset: fix duplicate values
Due to a minor typo, the string set had duplicate values, because strset_add() didn't check the base slot properly.
This commit is contained in:
parent
f0e64ceb48
commit
da1e858458
@ -85,7 +85,7 @@ void strset_add(struct strset *set, const char *value)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (slot = base_slot->next; slot != NULL; slot = slot->next)
|
for (slot = base_slot; slot != NULL; slot = slot->next)
|
||||||
if (strcmp(slot->value, value) == 0)
|
if (strcmp(slot->value, value) == 0)
|
||||||
/* found it - do nothing */
|
/* found it - do nothing */
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user