projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c1e22d
)
Make tag_set_add() avoid adding tags that are already present.
author
Ben Pfaff
<blp@nicira.com>
Wed, 24 Dec 2008 23:11:17 +0000
(15:11 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Fri, 26 Dec 2008 21:27:24 +0000
(13:27 -0800)
lib/tag.c
patch
|
blob
|
history
diff --git
a/lib/tag.c
b/lib/tag.c
index 9cca57a055261be0614d4239103948c66ca73afb..ed198fcb698f8f2ab0404c5be7b2311ba24c34d5 100644
(file)
--- a/
lib/tag.c
+++ b/
lib/tag.c
@@
-82,7
+82,7
@@
tag_set_init(struct tag_set *set)
void
tag_set_add(struct tag_set *set, tag_type tag)
{
- if (tag) {
+ if (tag
&& (!tag_is_valid(tag) || !tag_set_intersects(set, tag))
) {
/* XXX We could do better by finding the set member to which we would
* add the fewest number of 1-bits. This would reduce the amount of
* ambiguity, since e.g. three 1-bits match 3 * 2 / 2 = 3 unique tags