Fix logic error in slap_mods2entry()

This commit is contained in:
Luke Howard 2005-07-31 05:12:20 +00:00
parent 40ec064b66
commit 30610c6f70

View File

@ -395,12 +395,15 @@ slap_mods2entry(
const char **text, const char **text,
char *textbuf, size_t textlen ) char *textbuf, size_t textlen )
{ {
Attribute **tail = &(*e)->e_attrs; Attribute **tail;
if ( initial ) { if ( initial ) {
assert( *tail == NULL ); assert( (*e)->e_attrs == NULL );
} }
for ( tail = &(*e)->e_attrs; *tail != NULL; tail = &(*tail)->a_next )
;
*text = textbuf; *text = textbuf;
for( ; mods != NULL; mods = mods->sml_next ) { for( ; mods != NULL; mods = mods->sml_next ) {