]> git.sur5r.net Git - openldap/commitdiff
Warning cleanup: signed meets unsigned.
authorHallvard Furuseth <hallvard@openldap.org>
Fri, 17 Oct 2008 18:05:00 +0000 (18:05 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Fri, 17 Oct 2008 18:05:00 +0000 (18:05 +0000)
servers/slapd/back-ldap/config.c
servers/slapd/back-ldap/monitor.c

index ca89cf97f082a46f48b48f01f1148c2bb5a05384..d95f6815b9e3564744bf21bc5e42c82709dbc803 100644 (file)
@@ -520,7 +520,7 @@ slap_retry_info_unparse(
 
        BER_BVZERO( bvout );
 
-#define WHATSLEFT      ( sizeof( buf ) - ( ptr - buf ) )
+#define WHATSLEFT      ( &buf[ sizeof( buf ) ] - ptr )
 
        for ( i = 0; ri->ri_num[ i ] != SLAP_RETRYNUM_TAIL; i++ ) {
                if ( i > 0 ) {
index 8fcb597e589845ecb345a42b76cde967ca164636..73be42d9a052d50c51124d0a640bb5e986a62097 100644 (file)
@@ -469,7 +469,7 @@ ldap_back_monitor_db_open( BackendDB *be )
        ptr = lutil_strncopy( ptr, suffix.bv_val, suffix.bv_len );
        ptr = lutil_strcopy( ptr, "))" );
        ptr[ 0 ] = '\0';
-       assert( filter->bv_len == ptr - filter->bv_val );
+       assert( ptr == &filter->bv_val[ filter->bv_len ] );
 
        if ( suffix.bv_val != be->be_nsuffix[ 0 ].bv_val ) {
                ch_free( suffix.bv_val );