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)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 2 Apr 2014 07:03:44 +0000 (09:03 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/dirsync.c
source4/dsdb/samdb/ldb_modules/operational.c

index 69bb5a2011aadf7c8cd6dbfd251685539ea5530a..c93189ef71669e6ae63a43bebcd1da334555f5f5 100644 (file)
@@ -336,10 +336,13 @@ skip:
         * if not we remove the attribute.
         */
        for (i = msg->num_elements - 1; i >= 0; i--) {
+               const char *ldapattrname;
+
                el = &(msg->elements[i]);
+               ldapattrname = el->name;
+
                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;