From 1cc6b2ebe26f55de800b8de6144cfaafba1fcb9d Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 26 Apr 2005 00:33:43 +0000 Subject: [PATCH] don't use temporaries --- servers/slapd/overlays/rwmdn.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/servers/slapd/overlays/rwmdn.c b/servers/slapd/overlays/rwmdn.c index dd7203c3cd..8b26b9818a 100644 --- a/servers/slapd/overlays/rwmdn.c +++ b/servers/slapd/overlays/rwmdn.c @@ -157,13 +157,14 @@ rwm_dn_massage( { int rc = 0; struct berval mdn; + static char *dmy = ""; assert( dc ); assert( in ); assert( dn ); rc = rewrite_session( dc->rwmap->rwm_rw, dc->ctx, - ( in->bv_len ? in->bv_val : "" ), + ( in->bv_val ? in->bv_val : dmy ), dc->conn, &mdn.bv_val ); switch ( rc ) { case REWRITE_REGEXEC_OK: @@ -197,6 +198,10 @@ rwm_dn_massage( break; } + if ( mdn.bv_val == dmy ) { + BER_BVZERO( &mdn ); + } + return rc; } -- 2.39.5