From: Howard Chu Date: Thu, 17 Apr 2003 04:36:42 +0000 (+0000) Subject: Fix AVL comparisons X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~333 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d7a1eb0ea2a8bd8989459aae8caf02830d93281d;p=openldap Fix AVL comparisons --- diff --git a/servers/slapd/back-bdb/attr.c b/servers/slapd/back-bdb/attr.c index a5bfc4fd57..6fbee25672 100644 --- a/servers/slapd/back-bdb/attr.c +++ b/servers/slapd/back-bdb/attr.c @@ -29,7 +29,7 @@ ainfo_type_cmp( { const AttributeDescription *desc = v_desc; const AttrInfo *a = v_a; - return desc - a->ai_desc; + return (unsigned)desc - (unsigned)a->ai_desc; } static int @@ -39,7 +39,7 @@ ainfo_cmp( ) { const AttrInfo *a = v_a, *b = v_b; - return a->ai_desc - b->ai_desc; + return (unsigned)a->ai_desc - (unsigned)b->ai_desc; } void diff --git a/servers/slapd/back-ldap/bind.c b/servers/slapd/back-ldap/bind.c index 66c797d2e8..4497971d61 100644 --- a/servers/slapd/back-ldap/bind.c +++ b/servers/slapd/back-ldap/bind.c @@ -161,7 +161,7 @@ ldap_back_conn_cmp( /* For shared sessions, conn is NULL. Only explicitly * bound sessions will have non-NULL conn. */ - return lc1->conn - lc2->conn; + return (unsigned)lc1->conn - (unsigned)lc2->conn; } /* diff --git a/servers/slapd/back-ldbm/attr.c b/servers/slapd/back-ldbm/attr.c index 15b3055e91..42ad3389b6 100644 --- a/servers/slapd/back-ldbm/attr.c +++ b/servers/slapd/back-ldbm/attr.c @@ -29,7 +29,7 @@ ainfo_type_cmp( { const AttributeDescription *desc = v_desc; const AttrInfo *a = v_a; - return desc - a->ai_desc; + return (unsigned)desc - (unsigned)a->ai_desc; } static int @@ -39,7 +39,7 @@ ainfo_cmp( ) { const AttrInfo *a = v_a, *b = v_b; - return a->ai_desc - b->ai_desc; + return (unsigned)a->ai_desc - (unsigned)b->ai_desc; } void