CLEANUP: ebtree: remove a few annoying signedness warnings

(from ebtree 6.0.6)

Care has been taken not to make the code bigger (it even got smaller
due to a possible simplification).
(cherry picked from commit 7a2c1df646049c7daac52677ec11ed63048cd150)
This commit is contained in:
Willy Tarreau 2011-07-25 12:22:44 +02:00
parent f6f8225390
commit 22c0a93c63
2 changed files with 2 additions and 2 deletions

View File

@ -527,7 +527,7 @@ static forceinline struct ebmb_node *__ebmb_lookup_prefix(struct eb_root *root,
* bits, let's compare prefixes and descend the cover * bits, let's compare prefixes and descend the cover
* subtree if they match. * subtree if they match.
*/ */
if (node->node.bit >> 1 == pfx) if ((unsigned short)node->node.bit >> 1 == pfx)
troot = node->node.branches.b[EB_LEFT]; troot = node->node.branches.b[EB_LEFT];
else else
troot = node->node.branches.b[EB_RGHT]; troot = node->node.branches.b[EB_RGHT];

View File

@ -376,7 +376,7 @@ struct eb_node {
eb_troot_t *node_p; /* link node's parent */ eb_troot_t *node_p; /* link node's parent */
eb_troot_t *leaf_p; /* leaf node's parent */ eb_troot_t *leaf_p; /* leaf node's parent */
short int bit; /* link's bit position. */ short int bit; /* link's bit position. */
short int pfx; /* data prefix length, always related to leaf */ short unsigned int pfx; /* data prefix length, always related to leaf */
}; };
/* Return the structure of type <type> whose member <member> points to <ptr> */ /* Return the structure of type <type> whose member <member> points to <ptr> */