projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
031472d
)
svec: New function svec_is_empty().
author
Ben Pfaff
<blp@nicira.com>
Tue, 10 Nov 2009 23:31:03 +0000
(15:31 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Thu, 12 Nov 2009 20:56:21 +0000
(12:56 -0800)
lib/svec.c
patch
|
blob
|
history
lib/svec.h
patch
|
blob
|
history
diff --git
a/lib/svec.c
b/lib/svec.c
index 078b107042195900bf35da392cefd48b35161f07..81a36b57ae7544c9ef9d7fa5b1166790d961601a 100644
(file)
--- 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)
{
diff --git
a/lib/svec.h
b/lib/svec.h
index e1736bc6c399b5932265ee12c18d65f055443507..ff5619732be01f2498051c6b37a179022a8bfd14 100644
(file)
--- a/
lib/svec.h
+++ b/
lib/svec.h
@@
-32,6
+32,7
@@
void svec_init(struct svec *);
void svec_clone(struct svec *, const struct svec *);
void svec_destroy(struct svec *);
void svec_clear(struct svec *);
+bool svec_is_empty(const struct svec *);
void svec_add(struct svec *, const char *);
void svec_add_nocopy(struct svec *, char *);
void svec_del(struct svec *, const char *);