mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
don't use temporaries
This commit is contained in:
parent
6c65ad09b0
commit
1cc6b2ebe2
@ -157,13 +157,14 @@ rwm_dn_massage(
|
|||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
struct berval mdn;
|
struct berval mdn;
|
||||||
|
static char *dmy = "";
|
||||||
|
|
||||||
assert( dc );
|
assert( dc );
|
||||||
assert( in );
|
assert( in );
|
||||||
assert( dn );
|
assert( dn );
|
||||||
|
|
||||||
rc = rewrite_session( dc->rwmap->rwm_rw, dc->ctx,
|
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 );
|
dc->conn, &mdn.bv_val );
|
||||||
switch ( rc ) {
|
switch ( rc ) {
|
||||||
case REWRITE_REGEXEC_OK:
|
case REWRITE_REGEXEC_OK:
|
||||||
@ -197,6 +198,10 @@ rwm_dn_massage(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( mdn.bv_val == dmy ) {
|
||||||
|
BER_BVZERO( &mdn );
|
||||||
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user