From d130b7422f4001e0dea0fa5e55cb799557f1923c Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 20 Feb 2007 23:08:09 +0000 Subject: [PATCH] this should never occur, but in case keep it readable --- servers/slapd/filter.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 ); } -- 2.39.5