From 732dcb37a81c657fa587650bbf237e5f9c2bbc0d Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 24 Jun 2009 10:21:25 -0700 Subject: shash: New function shash_is_empty(). --- lib/shash.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/shash.c') diff --git a/lib/shash.c b/lib/shash.c index 9ddafe0be..7f6908436 100644 --- a/lib/shash.c +++ b/lib/shash.c @@ -51,6 +51,12 @@ shash_clear(struct shash *sh) } } +bool +shash_is_empty(const struct shash *shash) +{ + return hmap_is_empty(&shash->map); +} + /* It is the caller's responsible to avoid duplicate names, if that is * desirable. */ void -- cgit v1.2.1