diff options
author | Neale Ranns <nranns@cisco.com> | 2020-09-29 14:44:23 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-10-02 10:43:14 +0000 |
commit | eb69648bf8f8839bcc955a43921790c443946eb4 (patch) | |
tree | f3542df7ab34116adb1af6f0a83621d9ef2234db /src/vppinfra/bihash_template.c | |
parent | 9a59785c91acf12926224b4660f2b12fe1e9eb1d (diff) |
vppinfra: Function to check if a bihash has been initialised
Type: improvement
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ic31f7721f326ca9d78d645abcea63ce58df5bd5b
Diffstat (limited to 'src/vppinfra/bihash_template.c')
-rw-r--r-- | src/vppinfra/bihash_template.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vppinfra/bihash_template.c b/src/vppinfra/bihash_template.c index 561855a5644..555c2e00cfb 100644 --- a/src/vppinfra/bihash_template.c +++ b/src/vppinfra/bihash_template.c @@ -390,6 +390,11 @@ void BV (clib_bihash_set_kvp_format_fn) (BVT (clib_bihash) * h, h->kvp_fmt_fn = kvp_fmt_fn; } +int BV (clib_bihash_is_initialised) (const BVT (clib_bihash) * h) +{ + return (h->instantiated != 0); +} + void BV (clib_bihash_free) (BVT (clib_bihash) * h) { int i; |