]> git.sur5r.net Git - openldap/commitdiff
added assertions to catch helper function misuse
authorPierangelo Masarati <ando@openldap.org>
Fri, 23 Aug 2002 08:46:45 +0000 (08:46 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 23 Aug 2002 08:46:45 +0000 (08:46 +0000)
servers/slapd/modrdn.c

index 8bf032189e818de2f8467d55cfefbe7cf8589c8f..7c8b4390bfeb8436ac01a9230dfd42e8343cc4aa 100644 (file)
@@ -401,6 +401,9 @@ 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++ ) {
                AttributeDescription    *desc = NULL;