s4:dsdb/ldb_modules: avoid declaration after code warnings
authorStefan Metzmacher <metze@samba.org>
Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 12 Mar 2014 22:39:55 +0000 (23:39 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source4/dsdb/samdb/ldb_modules/dirsync.c
source4/dsdb/samdb/ldb_modules/operational.c

index 69bb5a2011aadf7c8cd6dbfd251685539ea5530a..47db0a5ef4129447f54fa8e53cddb542665fda0c 100644 (file)
@@ -336,10 +336,11 @@ skip:
         * if not we remove the attribute.
         */
        for (i = msg->num_elements - 1; i >= 0; i--) {
+               const char *ldapattrname = el->name;
+
                el = &(msg->elements[i]);
                attr = dsdb_attribute_by_lDAPDisplayName(dsc->schema,
                                el->name);
-               const char *ldapattrname = el->name;
                keep = false;
 
                if (attr->linkID & 1) {
index 9337faacc4ccf55f63aea9d9f13812b6f29b42eb..2ebefac171316d45e6a883c8b88a68ae17ef1f43 100644 (file)
@@ -131,7 +131,7 @@ static int construct_token_groups(struct ldb_module *module,
                                  struct ldb_message *msg, enum ldb_scope scope,
                                  struct ldb_request *parent)
 {
-       struct ldb_context *ldb = ldb_module_get_ctx(module);;
+       struct ldb_context *ldb = ldb_module_get_ctx(module);
        TALLOC_CTX *tmp_ctx = talloc_new(msg);
        unsigned int i;
        int ret;