diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-06-03 17:56:09 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-06-06 20:47:41 +0200 |
commit | 430491b2df9e3512a98a88aa279f04a91c12be92 (patch) | |
tree | 54b6a964a7c1cd54424406cbd04376a1f0082c7a /source4 | |
parent | cadf774f8b8af2aedcdd359acf51695e9f4b04db (diff) | |
download | samba-430491b2df9e3512a98a88aa279f04a91c12be92.tar.gz samba-430491b2df9e3512a98a88aa279f04a91c12be92.tar.bz2 samba-430491b2df9e3512a98a88aa279f04a91c12be92.zip |
s4:rdn_name LDB module - remove "rdn_name_find_attribute"
It does exactly the same as "ldb_msg_find_element".
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/ldb/modules/rdn_name.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/source4/lib/ldb/modules/rdn_name.c b/source4/lib/ldb/modules/rdn_name.c index 3a4068daf2..ee5ab9a4fd 100644 --- a/source4/lib/ldb/modules/rdn_name.c +++ b/source4/lib/ldb/modules/rdn_name.c @@ -46,19 +46,6 @@ struct rename_context { struct ldb_reply *ares; }; -static struct ldb_message_element *rdn_name_find_attribute(const struct ldb_message *msg, const char *name) -{ - unsigned int i; - - for (i = 0; i < msg->num_elements; i++) { - if (ldb_attr_cmp(name, msg->elements[i].name) == 0) { - return &msg->elements[i]; - } - } - - return NULL; -} - static int rdn_name_add_callback(struct ldb_request *req, struct ldb_reply *ares) { @@ -130,7 +117,7 @@ static int rdn_name_add(struct ldb_module *module, struct ldb_request *req) rdn_val = ldb_val_dup(msg, ldb_dn_get_rdn_val(msg->dn)); /* Perhaps someone above us tried to set this? */ - if ((attribute = rdn_name_find_attribute(msg, "name")) != NULL ) { + if ((attribute = ldb_msg_find_element(msg, "name")) != NULL ) { attribute->num_values = 0; } @@ -144,7 +131,7 @@ static int rdn_name_add(struct ldb_module *module, struct ldb_request *req) return LDB_ERR_OPERATIONS_ERROR; } - attribute = rdn_name_find_attribute(msg, rdn_name); + attribute = ldb_msg_find_element(msg, rdn_name); if (!attribute) { /* add entry with normalised RDN information if possible */ if (a->name != NULL) { |