From ff4edfa0544e54b10bbc9c1c35dc0338ad2687e8 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 23 Aug 2002 08:46:45 +0000 Subject: [PATCH] added assertions to catch helper function misuse --- servers/slapd/modrdn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index 8bf032189e..7c8b4390bf 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -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; -- 2.39.5