BUILD: ebtree: make eb_is_empty() and eb_is_dup() take a const

For whatever absurd reason these ones do not take a const, resulting in
some haproxy functions being forced to confusingly use variables instead
of const arguments. Let's fix this and backport it to older versions.
This commit is contained in:
Willy Tarreau 2019-10-02 15:21:58 +02:00
parent 9edf6dbecc
commit 43be340a0e
1 changed files with 2 additions and 2 deletions

View File

@ -520,13 +520,13 @@ __eb_insert_dup(struct eb_node *sub, struct eb_node *new)
\**************************************/
/* Return non-zero if the tree is empty, otherwise zero */
static inline int eb_is_empty(struct eb_root *root)
static inline int eb_is_empty(const struct eb_root *root)
{
return !root->b[EB_LEFT];
}
/* Return non-zero if the node is a duplicate, otherwise zero */
static inline int eb_is_dup(struct eb_node *node)
static inline int eb_is_dup(const struct eb_node *node)
{
return node->bit < 0;
}