From 81dcd3ca58b8e60878bd3b4e368b87447c3e36d8 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Fri, 2 Jul 2010 07:43:29 +0000 Subject: [PATCH] Fixed last commit. gcc was complaining about defined behavior. --- servers/slapd/controls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.39.5