-/* Adds the 'n' key-value pairs in 'keys' in 'values' to 'shash'. */
-static void
-smap_from_ovs_idl_map(char **keys, char **values, size_t n, struct smap *smap)
-{
- size_t i;
-
- smap_init(smap);
- for (i = 0; i < n; i++) {
- smap_add(smap, keys[i], values[i]);
- }
-}
-
-/* Creates 'keys' and 'values' arrays from 'shash'.
- *
- * Sets 'keys' and 'values' to heap allocated arrays representing the key-value
- * pairs in 'smap'. The caller takes ownership of 'keys' and 'values'. They
- * are populated with with strings taken directly from 'shash' and thus have
- * the same ownership of the key-value pairs in shash.
- */
-static void
-smap_to_ovs_idl_map(struct smap *smap,
- char ***keys, char ***values, size_t *n)
-{
- size_t i, count;
- char **k, **v;
- struct smap_node *sn;
-
- count = smap_count(smap);
-
- k = xmalloc(count * sizeof *k);
- v = xmalloc(count * sizeof *v);
-
- i = 0;
- SMAP_FOR_EACH(sn, smap) {
- k[i] = sn->key;
- v[i] = sn->value;
- i++;
- }
-
- *n = count;
- *keys = k;
- *values = v;
-}
-