]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/modrdn.c
trace illegal condition in backsql_strfcat
[openldap] / servers / slapd / modrdn.c
index be11fdb6e0bb93c300bd9bc69c6ea7b1b77f694d..7c8b4390bfeb8436ac01a9230dfd42e8343cc4aa 100644 (file)
@@ -401,9 +401,11 @@ slap_modrdn2mods(
        Modifications   *mod = NULL;
        int             a_cnt, d_cnt;
 
+       assert( new_rdn != NULL );
+       assert( !deleteoldrdn || old_rdn != NULL );
+
        /* Add new attribute values to the entry */
        for ( a_cnt = 0; new_rdn[ 0 ][ a_cnt ]; a_cnt++ ) {
-               int                     rc;
                AttributeDescription    *desc = NULL;
                Modifications           *mod_tmp;
 
@@ -458,7 +460,6 @@ slap_modrdn2mods(
        /* Remove old rdn value if required */
        if ( deleteoldrdn ) {
                for ( d_cnt = 0; old_rdn[ 0 ][ d_cnt ]; d_cnt++ ) {
-                       int                     rc;
                        AttributeDescription    *desc = NULL;
                        Modifications           *mod_tmp;