From da1e8584585af9c92b92a25c049829b7012af191 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 8 Sep 2008 12:07:08 +0200 Subject: 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. --- src/strset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/strset.c b/src/strset.c index 6bf61a4b2..475266370 100644 --- a/src/strset.c +++ b/src/strset.c @@ -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; -- cgit v1.2.3