From: Pierangelo Masarati Date: Thu, 28 Nov 2002 08:25:12 +0000 (+0000) Subject: perhaps the assert can be removed; should work now X-Git-Tag: NO_SLAP_OP_BLOCKS~756 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a7c5307279c6cc5115b6215d0c64f6cba67b7dc4;p=openldap perhaps the assert can be removed; should work now --- diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index 1056944ebd..78f2eec5a1 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -123,7 +123,7 @@ ID bdb_tool_entry_put( assert( text ); assert( text->bv_val ); - assert( text->bv_val[0] == '\0' ); + assert( text->bv_val[0] == '\0' ); /* overconservative? */ #ifdef NEW_LOGGING LDAP_LOG ( TOOLS, ARGS, "=> bdb_tool_entry_put( %ld, \"%s\" )\n", diff --git a/servers/slapd/back-ldbm/tools.c b/servers/slapd/back-ldbm/tools.c index 5d0855bfe5..5f415384f1 100644 --- a/servers/slapd/back-ldbm/tools.c +++ b/servers/slapd/back-ldbm/tools.c @@ -179,7 +179,7 @@ ID ldbm_tool_entry_put( assert( text ); assert( text->bv_val ); - assert( text->bv_val[0] == '\0' ); + assert( text->bv_val[0] == '\0' ); /* overconservative? */ if ( next_id_get( be, &id ) || id == NOID ) { strncpy( text->bv_val, "unable to get nextid", text->bv_len ); diff --git a/servers/slapd/tools/slapadd.c b/servers/slapd/tools/slapadd.c index 81f81f3f41..1f31d57735 100644 --- a/servers/slapd/tools/slapadd.c +++ b/servers/slapd/tools/slapadd.c @@ -59,8 +59,12 @@ main( int argc, char **argv ) Entry *e = str2entry( buf ); struct berval bvtext; + /* + * Initialize text buffer + */ bvtext.bv_len = textlen; bvtext.bv_val = textbuf; + bvtext.bv_val[0] = '\0'; if( e == NULL ) { fprintf( stderr, "%s: could not parse entry (line=%d)\n",