X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fabandon.c;h=d8cb33128dd6631d808b85d83cbd042dc42dba72;hb=fedbb4fb3d9d52ad050d688a1f7bde66db34b836;hp=8f2fb3419499583f22babc83938cba956afc923e;hpb=d4124e0e031f5b76a80f9c25a04146d334bcf898;p=openldap diff --git a/libraries/libldap/abandon.c b/libraries/libldap/abandon.c index 8f2fb34194..d8cb33128d 100644 --- a/libraries/libldap/abandon.c +++ b/libraries/libldap/abandon.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2008 The OpenLDAP Foundation. + * Copyright 1998-2010 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -349,7 +349,6 @@ ldap_int_bisect_find( ber_int_t *v, ber_len_t n, ber_int_t id, int *idxp ) end, rc = 0; - assert( n >= 0 ); assert( id >= 0 ); begin = 0; @@ -410,9 +409,8 @@ ldap_int_bisect_insert( ber_int_t **vp, ber_len_t *np, int id, int idx ) assert( vp != NULL ); assert( np != NULL ); - assert( *np >= 0 ); assert( idx >= 0 ); - assert( idx <= *np ); + assert( (unsigned) idx <= *np ); n = *np; @@ -447,14 +445,12 @@ int ldap_int_bisect_delete( ber_int_t **vp, ber_len_t *np, int id, int idx ) { ber_int_t *v; - ber_len_t n; - int i; + ber_len_t i, n; assert( vp != NULL ); assert( np != NULL ); - assert( *np >= 0 ); assert( idx >= 0 ); - assert( idx < *np ); + assert( (unsigned) idx < *np ); v = *vp;