summaryrefslogtreecommitdiff
path: root/src/hwdb
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-03-25 22:43:43 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-03-26 15:28:03 +0200
commitd6c5d19b66d61d9ca8293b31aaefe310ae691d30 (patch)
tree8c3e5f66f423d8043480ef36371664787b4f7aaf /src/hwdb
parent989290dbf192b24609fa36379241f2f1edf19d8a (diff)
downloadsystemd-d6c5d19b66d61d9ca8293b31aaefe310ae691d30.tar.gz
tree-wide: add bsearch_safe and use where appropriate
Should fix #8557.
Diffstat (limited to 'src/hwdb')
-rw-r--r--src/hwdb/hwdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c
index f579ef737e..6b450b4bb1 100644
--- a/src/hwdb/hwdb.c
+++ b/src/hwdb/hwdb.c
@@ -123,7 +123,7 @@ static struct trie_node *node_lookup(const struct trie_node *node, uint8_t c) {
struct trie_child_entry search;
search.c = c;
- child = bsearch(&search, node->children, node->children_count, sizeof(struct trie_child_entry), trie_children_cmp);
+ child = bsearch_safe(&search, node->children, node->children_count, sizeof(struct trie_child_entry), trie_children_cmp);
if (child)
return child->child;
return NULL;