]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[CLEANUP] ebtree: cast to char * to get rid of gcc warning
authorWilly Tarreau <w@1wt.eu>
Thu, 29 Oct 2009 11:00:11 +0000 (12:00 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 29 Oct 2009 11:00:11 +0000 (12:00 +0100)
Gcc warns about potential signedness issues when using strcmp().

ebtree/ebsttree.h

index fb34ea9a41d6d5e702482b9e479bb5d8edf545dd..63ee4f5cbd308dd658223380b0233db5eea46c97 100644 (file)
@@ -48,7 +48,7 @@ static forceinline struct ebmb_node *__ebst_lookup(struct eb_root *root, const v
                if ((eb_gettag(troot) == EB_LEAF)) {
                        node = container_of(eb_untag(troot, EB_LEAF),
                                            struct ebmb_node, node.branches);
-                       if (strcmp(node->key, x) == 0)
+                       if (strcmp((char *)node->key, x) == 0)
                                return node;
                        else
                                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
                         * one and we don't have our key.
                         */
-                       if (strcmp(node->key, x) != 0)
+                       if (strcmp((char *)node->key, x) != 0)
                                return NULL;
 
                        troot = node->node.branches.b[EB_LEFT];