From 439a2d69831aea4a737e5e0e35226a551b11ad29 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 26 Nov 2010 10:10:01 +1100 Subject: s4-objectclass Use a specific local variable name, not 'value' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes it clearer what the local variable in use here does. Andrew Bartlett Signed-off-by: Matthias Dieter Wallnöfer --- source4/dsdb/samdb/ldb_modules/objectclass.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c index 21f316400a..0eceaefce4 100644 --- a/source4/dsdb/samdb/ldb_modules/objectclass.c +++ b/source4/dsdb/samdb/ldb_modules/objectclass.c @@ -389,6 +389,7 @@ static int objectclass_add(struct ldb_module *module, struct ldb_request *req) instanceType = ldb_msg_find_attr_as_uint(req->op.add.message, "instanceType", 0); if (!(instanceType & INSTANCE_TYPE_IS_NC_HEAD)) { + char *referral_uri; /* When we are trying to readd the root basedn then * this is denied, but with an interesting mechanism: * there is generated a referral with the last @@ -398,13 +399,13 @@ static int objectclass_add(struct ldb_module *module, struct ldb_request *req) if (val == NULL) { return ldb_operr(ldb); } - value = talloc_asprintf(req, "ldap://%s/%s", val->data, - ldb_dn_get_linearized(req->op.add.message->dn)); - if (value == NULL) { + referral_uri = talloc_asprintf(req, "ldap://%s/%s", val->data, + ldb_dn_get_linearized(req->op.add.message->dn)); + if (referral_uri == NULL) { return ldb_module_oom(module); } - return ldb_module_send_referral(req, value); + return ldb_module_send_referral(req, referral_uri); } } -- cgit