kv_pair: remove unused kv_pair array functions
These don't seem to be used anywhere, at least not in any published
code, and kv_pair_new_array() appears to misuse calloc() anyway.
BUG=none
BRANCH=none
TEST=ChromeOS compiles for ARM and x86 platforms
Change-Id: Ife3e19dc4b3019251a119336d6c6b77a9de046cf
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/366898
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
diff --git a/lib/kv_pair.c b/lib/kv_pair.c
index 336ee4f..327a64e 100644
--- a/lib/kv_pair.c
+++ b/lib/kv_pair.c
@@ -63,18 +63,6 @@
return kv;
}
-struct kv_pair **kv_pair_new_array(size_t size)
-{
- struct kv_pair **kv;
- size_t i;
-
- kv = (struct kv_pair **) calloc(0, sizeof(kv) * size);
- for (i = 0; i < size; ++i) {
- kv[i] = kv_pair_new();
- }
- return kv;
-}
-
struct kv_pair *kv_pair_add(struct kv_pair *kv_list,
const char *key, const char *value)
{
@@ -163,15 +151,6 @@
}
}
-void kv_pair_free_array(struct kv_pair **kv_array, size_t size)
-{
- size_t i;
- for (i = 0; i < size; ++i) {
- kv_pair_free(kv_array[i]);
- }
- free(kv_array);
-}
-
void kv_pair_print_to_file(FILE* fp, struct kv_pair *kv_list,
enum kv_pair_style style)
{