]> git.sur5r.net Git - openldap/commitdiff
Fix AVL comparisons
authorHoward Chu <hyc@openldap.org>
Thu, 17 Apr 2003 04:36:42 +0000 (04:36 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 17 Apr 2003 04:36:42 +0000 (04:36 +0000)
servers/slapd/back-bdb/attr.c
servers/slapd/back-ldap/bind.c
servers/slapd/back-ldbm/attr.c

index a5bfc4fd571e9e4b97a79dc2340413b812b3bd49..6fbee256728a3536782649abb1d2402752e6ca69 100644 (file)
@@ -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
index 66c797d2e8e0bdea195a3496b2ef0bbcd1271f6b..4497971d61d7186b79bf6980af88f6c7428fb5c1 100644 (file)
@@ -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;
 }
 
 /*
index 15b3055e91f4eb2b0355969ae1afc7f330bbfa89..42ad3389b6d7a6c1d5a922e8ac7f4f1065a52ad3 100644 (file)
@@ -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