[CLEANUP] ebtree: cast to char * to get rid of gcc warning

Gcc warns about potential signedness issues when using strcmp().
This commit is contained in:
Willy Tarreau 2009-10-29 12:00:11 +01:00
parent de71d16ec0
commit 4c84822d97
1 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ static forceinline struct ebmb_node *__ebst_lookup(struct eb_root *root, const v
if ((eb_gettag(troot) == EB_LEAF)) { if ((eb_gettag(troot) == EB_LEAF)) {
node = container_of(eb_untag(troot, EB_LEAF), node = container_of(eb_untag(troot, EB_LEAF),
struct ebmb_node, node.branches); struct ebmb_node, node.branches);
if (strcmp(node->key, x) == 0) if (strcmp((char *)node->key, x) == 0)
return node; return node;
else else
return NULL; return NULL;
@ -61,7 +61,7 @@ static forceinline struct ebmb_node *__ebst_lookup(struct eb_root *root, const v
* value, and we walk down left, or it's a different * value, and we walk down left, or it's a different
* one and we don't have our key. * one and we don't have our key.
*/ */
if (strcmp(node->key, x) != 0) if (strcmp((char *)node->key, x) != 0)
return NULL; return NULL;
troot = node->node.branches.b[EB_LEFT]; troot = node->node.branches.b[EB_LEFT];