~sircmpwn/koio

1e1f6365140418026522a5b79bf1e90d919bf53e — Simon Ser 5 years ago ad89ac7 0.1.1
hashtable: fix ko_hashtable_set when appending to a bucket
1 files changed, 2 insertions(+), 1 deletions(-)

M lib/hashtable.c
M lib/hashtable.c => lib/hashtable.c +2 -1
@@ 57,9 57,10 @@ void *ko_hashtable_set(struct ko_hashtable *table, const char *key, void *value)
		entry = calloc(1, sizeof(struct ko_hashtable_entry));
		entry->hash = hash;
		entry->key = strdup(key);
		table->buckets[bucket] = entry;
		if (previous) {
			previous->next = entry;
		} else {
			table->buckets[bucket] = entry;
		}
	}