From: Ralf Haferkamp Date: Fri, 2 Jul 2010 07:43:29 +0000 (+0000) Subject: Fixed last commit. gcc was complaining about defined behavior. X-Git-Tag: MIGRATION_CVS2GIT~553 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=81dcd3ca58b8e60878bd3b4e368b87447c3e36d8;p=openldap Fixed last commit. gcc was complaining about defined behavior. --- diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c index 8b31e2a677..18a7927a29 100644 --- a/servers/slapd/controls.c +++ b/servers/slapd/controls.c @@ -357,9 +357,9 @@ unregister_supported_control( const char *controloid ) for ( i = 0; slap_known_controls[ i ]; i++ ) { if ( strcmp( controloid, slap_known_controls[ i ] ) == 0 ) { - while ( slap_known_controls[i] ) { - slap_known_controls[i++] = slap_known_controls[i]; - } + do { + slap_known_controls[ i ] = slap_known_controls[ i+1 ]; + } while ( slap_known_controls[ i++ ] ); num_known_controls--; break; }