aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-08 12:07:08 +0200
committerEric Wong <normalperson@yhbt.net>2008-09-09 00:40:26 -0700
commit65c88720fbc08bb9ca2cb37ffa75fd842ff3f1d1 (patch)
treed57903cfb437b082717d935cf8220c0da7fd23e4
parent890be9ba54716ba765326228f7b34c0d1902e02b (diff)
downloadmpd-65c88720fbc08bb9ca2cb37ffa75fd842ff3f1d1.tar.gz
mpd-65c88720fbc08bb9ca2cb37ffa75fd842ff3f1d1.tar.xz
mpd-65c88720fbc08bb9ca2cb37ffa75fd842ff3f1d1.zip
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.
-rw-r--r--src/strset.c2
1 files changed, 1 insertions, 1 deletions
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;