From: Pierangelo Masarati Date: Tue, 20 Feb 2007 23:08:09 +0000 (+0000) Subject: this should never occur, but in case keep it readable X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~656 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d130b7422f4001e0dea0fa5e55cb799557f1923c;p=openldap this should never occur, but in case keep it readable --- diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index f7b6821482..d3ceb0b8a8 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -618,16 +618,16 @@ simple: len = fstr->bv_len; filter_escape_value_x( &f->f_sub_initial, &tmp, op->o_tmpmemctx ); - tmplen = tmp.bv_len ? tmp.bv_len : STRLENOF( "(null)" ); + tmplen = tmp.bv_len; fstr->bv_len += tmplen; fstr->bv_val = op->o_tmprealloc( fstr->bv_val, fstr->bv_len + 1, op->o_tmpmemctx ); - snprintf( &fstr->bv_val[len-2], + snprintf( &fstr->bv_val[len - 2], tmplen + STRLENOF( /*(*/ "*)" ) + 1, /* "(attr=" */ "%s*)", - tmp.bv_len ? tmp.bv_val : "(null)"); + tmp.bv_len ? tmp.bv_val : ""); ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); } @@ -639,16 +639,16 @@ simple: len = fstr->bv_len; filter_escape_value_x( &f->f_sub_any[i], &tmp, op->o_tmpmemctx ); - tmplen = tmp.bv_len ? tmp.bv_len : STRLENOF( "(null)" ); + tmplen = tmp.bv_len; fstr->bv_len += tmplen + STRLENOF( /*(*/ ")" ); fstr->bv_val = op->o_tmprealloc( fstr->bv_val, fstr->bv_len + 1, op->o_tmpmemctx ); - snprintf( &fstr->bv_val[len-1], + snprintf( &fstr->bv_val[len - 1], tmplen + STRLENOF( /*(*/ "*)" ) + 1, /* "(attr=[init]*[any*]" */ "%s*)", - tmp.bv_len ? tmp.bv_val : "(null)"); + tmp.bv_len ? tmp.bv_val : ""); ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); } } @@ -659,16 +659,16 @@ simple: len = fstr->bv_len; filter_escape_value_x( &f->f_sub_final, &tmp, op->o_tmpmemctx ); - tmplen = tmp.bv_len ? tmp.bv_len : STRLENOF( "(null)" ); + tmplen = tmp.bv_len; fstr->bv_len += tmplen; fstr->bv_val = op->o_tmprealloc( fstr->bv_val, fstr->bv_len + 1, op->o_tmpmemctx ); - snprintf( &fstr->bv_val[len-1], + snprintf( &fstr->bv_val[len - 1], tmplen + STRLENOF( /*(*/ ")" ) + 1, /* "(attr=[init*][any*]" */ "%s)", - tmp.bv_len ? tmp.bv_val : "(null)"); + tmp.bv_len ? tmp.bv_val : ""); ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); }