@@ -17,6 +17,7 @@
#include <config.h>
#include "openvswitch/shash.h"
#include "hash.h"
+#include "util.h"
static struct shash_node *shash_find__(const struct shash *,
const char *name, size_t name_len,
@@ -100,6 +101,7 @@ shash_is_empty(const struct shash *shash)
size_t
shash_count(const struct shash *shash)
{
+ ovs_assert(shash);
return hmap_count(&shash->map);
}
@@ -17,6 +17,7 @@
#include <config.h>
#include "simap.h"
#include "hash.h"
+#include "util.h"
static size_t hash_name(const char *, size_t length);
static struct simap_node *simap_find__(const struct simap *,
@@ -84,6 +85,7 @@ simap_is_empty(const struct simap *simap)
size_t
simap_count(const struct simap *simap)
{
+ ovs_assert(simap);
return hmap_count(&simap->map);
}
@@ -300,6 +300,7 @@ smap_is_empty(const struct smap *smap)
size_t
smap_count(const struct smap *smap)
{
+ ovs_assert(smap);
return hmap_count(&smap->map);
}