From: Howard Chu Date: Wed, 9 Nov 2011 23:34:53 +0000 (-0800) Subject: More debug msg null pointer checks X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3b2961fcc203485d17f30d083a88a11e1e9a4b00;p=openldap More debug msg null pointer checks --- diff --git a/servers/slapd/back-mdb/index.c b/servers/slapd/back-mdb/index.c index 4d2dc01457..2bde863a3a 100644 --- a/servers/slapd/back-mdb/index.c +++ b/servers/slapd/back-mdb/index.c @@ -496,7 +496,7 @@ mdb_index_entry( Debug( LDAP_DEBUG_TRACE, "=> index_entry_%s( %ld, \"%s\" )\n", opid == SLAP_INDEX_DELETE_OP ? "del" : "add", - (long) e->e_id, e->e_dn ); + (long) e->e_id, e->e_dn ? e->e_dn : "" ); /* add each attribute to the indexes */ for ( ; ap != NULL; ap = ap->a_next ) { @@ -569,7 +569,7 @@ mdb_index_entry( Debug( LDAP_DEBUG_TRACE, "<= index_entry_%s( %ld, \"%s\" ) success\n", opid == SLAP_INDEX_DELETE_OP ? "del" : "add", - (long) e->e_id, e->e_dn ); + (long) e->e_id, e->e_dn ? e->e_dn : "" ); return LDAP_SUCCESS; } diff --git a/servers/slapd/back-mdb/tools.c b/servers/slapd/back-mdb/tools.c index 2d733849a5..0ce1e22d21 100644 --- a/servers/slapd/back-mdb/tools.c +++ b/servers/slapd/back-mdb/tools.c @@ -805,8 +805,8 @@ int mdb_tool_entry_reindex( */ Debug( LDAP_DEBUG_TRACE, - "=> " LDAP_XSTRING(mdb_tool_entry_reindex) "( %ld, \"%s\" )\n", - (long) id, e->e_dn, 0 ); + "=> " LDAP_XSTRING(mdb_tool_entry_reindex) "( %ld )\n", + (long) id, 0, 0 ); op.o_hdr = &ohdr; op.o_bd = be;