Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
pkghash: remove now unused functions
Baptiste Daroussin committed 4 years ago
commit b4b93c85ddbad8e47f4ad81107d145ecb57939ae
parent 9b49b83
2 files changed +0 -31
modified libpkg/pkghash.c
@@ -186,35 +186,6 @@ pkghash_next(pkghash_it *it)
	return (false);
}

-
void
-
pkghash_loopinit(pkghash *h)
-
{
-
	if (h == NULL)
-
		return;
-
	h->index = 0;
-
}
-

-
pkghash_entry *
-
pkghash_inext(pkghash *h)
-
{
-
	if (h == NULL)
-
		return (NULL);
-
	if (h->count == 0) {
-
		h->index = 0;
-
		return (NULL);
-
	}
-

-
	while (h->index < h->capacity) {
-
		size_t i = h->index;
-
		h->index++;
-
		if (h->entries[i].key != NULL)
-
			return (&h->entries[i]);
-
	}
-
	/* rewind just in case */
-
	h->index = 0;
-
	return (NULL);
-
}
-

bool
pkghash_del(pkghash *h, const char *key)
{
modified libpkg/pkghash.h
@@ -35,8 +35,6 @@ bool pkghash_next(pkghash_it *it);
	pkghash_add(_t, _k, _v, _free_func);          \
} while (0);

-
void pkghash_loopinit(pkghash *h);
-
pkghash_entry *pkghash_inext(pkghash *h);
bool pkghash_del(pkghash *h, const char *key);
void *pkghash_delete(pkghash *h, const char *key);
void *pkghash_get_value(pkghash *h, const char *key);