From 670ec4f938fd891c5e7600c266b85bb85163fec9 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Fri, 17 Oct 2008 18:05:00 +0000 Subject: [PATCH] Warning cleanup: signed meets unsigned. --- servers/slapd/back-ldap/config.c | 2 +- servers/slapd/back-ldap/monitor.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-ldap/config.c b/servers/slapd/back-ldap/config.c index ca89cf97f0..d95f6815b9 100644 --- a/servers/slapd/back-ldap/config.c +++ b/servers/slapd/back-ldap/config.c @@ -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 ) { diff --git a/servers/slapd/back-ldap/monitor.c b/servers/slapd/back-ldap/monitor.c index 8fcb597e58..73be42d9a0 100644 --- a/servers/slapd/back-ldap/monitor.c +++ b/servers/slapd/back-ldap/monitor.c @@ -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 ); -- 2.39.5