summaryrefslogtreecommitdiff
path: root/lib/shash.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/shash.c')
-rw-r--r--lib/shash.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/shash.c b/lib/shash.c
index 7f6908436..931637276 100644
--- a/lib/shash.c
+++ b/lib/shash.c
@@ -97,3 +97,11 @@ shash_find_data(const struct shash *sh, const char *name)
struct shash_node *node = shash_find(sh, name);
return node ? node->data : NULL;
}
+
+struct shash_node *
+shash_first(const struct shash *shash)
+{
+ struct hmap_node *node = hmap_first(&shash->map);
+ return node ? CONTAINER_OF(node, struct shash_node, node) : NULL;
+}
+