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:
Max Kellermann 2008-09-08 12:07:08 +02:00
parent f0e64ceb48
commit da1e858458

View File

@ -85,7 +85,7 @@ void strset_add(struct strset *set, const char *value)
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)
/* found it - do nothing */
return;