From d7a1eb0ea2a8bd8989459aae8caf02830d93281d Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 17 Apr 2003 04:36:42 +0000 Subject: [PATCH] Fix AVL comparisons --- servers/slapd/back-bdb/attr.c | 4 ++-- servers/slapd/back-ldap/bind.c | 2 +- servers/slapd/back-ldbm/attr.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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 -- 2.39.5