summaryrefslogtreecommitdiff
path: root/lib/svec.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-11-10 15:31:03 -0800
committerBen Pfaff <blp@nicira.com>2009-11-12 12:56:21 -0800
commit8ecd53084ce42e2e868a9c24c57b2d9a7e59cfc2 (patch)
tree72cd03ef5b18961a06dc5b287e2019bea18fb41b /lib/svec.c
parent031472d9e29c00fe470335ad6fc136fd9a9ae075 (diff)
downloadopenvswitch-8ecd53084ce42e2e868a9c24c57b2d9a7e59cfc2.tar.gz
svec: New function svec_is_empty().
Diffstat (limited to 'lib/svec.c')
-rw-r--r--lib/svec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/svec.c b/lib/svec.c
index 078b10704..81a36b57a 100644
--- a/lib/svec.c
+++ b/lib/svec.c
@@ -59,6 +59,12 @@ svec_clear(struct svec *svec)
svec->n = 0;
}
+bool
+svec_is_empty(const struct svec *svec)
+{
+ return svec->n == 0;
+}
+
void
svec_add(struct svec *svec, const char *name)
{