]> git.sur5r.net Git - openldap/commitdiff
Fixed last commit. gcc was complaining about defined behavior.
authorRalf Haferkamp <ralf@openldap.org>
Fri, 2 Jul 2010 07:43:29 +0000 (07:43 +0000)
committerRalf Haferkamp <ralf@openldap.org>
Fri, 2 Jul 2010 07:43:29 +0000 (07:43 +0000)
servers/slapd/controls.c

index 8b31e2a677b8694c68b8703eb612f91f37297de5..18a7927a29fcb00227afaae43845d84fe64aa2b7 100644 (file)
@@ -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;
                }