summaryrefslogtreecommitdiff
path: root/int-set.c
diff options
context:
space:
mode:
Diffstat (limited to 'int-set.c')
-rw-r--r--int-set.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/int-set.c b/int-set.c
index c58ee5d..853bb9e 100644
--- a/int-set.c
+++ b/int-set.c
@@ -137,6 +137,18 @@ int_set_destroy(struct int_set *set)
free(set);
}
+/* Does the set contain an entry with the given value.
+ */
+bool
+int_set_contains(struct int_set *set, uint32_t value)
+{
+ struct int_set_entry *entry;
+
+ entry = int_set_search(set, value);
+
+ return entry != NULL;
+}
+
/**
* Finds a set entry with the given value
*