[SAMBA 4] Some cosmetic changes for the LDB modules
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 17 Jul 2009 16:13:28 +0000 (18:13 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 19 Jul 2009 13:59:13 +0000 (15:59 +0200)
Some corrections which make the code a bit more readable (no functional changes here)

source4/dsdb/samdb/ldb_modules/linked_attributes.c
source4/dsdb/samdb/ldb_modules/password_hash.c

index 4e28c8a1496b8d85846ffdcd67412caba845bda5..9ed06a91309cadf1d9ef16e09e651a18388ca247 100644 (file)
@@ -741,15 +741,15 @@ static int la_op_search_callback(struct ldb_request *req,
                        if (ret != LDB_SUCCESS) {
                                return ldb_module_done(ac->req, NULL, NULL, ret);
                        }
-                       break;
-               case LDB_RENAME:
-                       
+                       return ret;
+
+               case LDB_RENAME:        
+                       /* start the mod requests chain */
                        ret = la_do_mod_request(ac);
                        if (ret != LDB_SUCCESS) {
                                return ldb_module_done(ac->req, NULL, NULL,
                                                       ret);
-                       }
-       
+                       }       
                        return ret;
                        
                default:
@@ -759,7 +759,6 @@ static int la_op_search_callback(struct ldb_request *req,
                        return ldb_module_done(ac->req, NULL, NULL,
                                                LDB_ERR_OPERATIONS_ERROR);
                }
-               return LDB_SUCCESS;
        }
 
        talloc_free(ares);
index ef641ac18bf69dc2880a9a7ef647002fc5999f85..c7fa636aa801e25f1cc667a96e5dbd8ae1dca3f3 100644 (file)
@@ -1400,33 +1400,33 @@ static int setup_password_fields(struct setup_password_fields_io *io)
                }
 
                ret = setup_kerberos_keys(io);
-               if (ret != 0) {
+               if (ret != LDB_SUCCESS) {
                        return ret;
                }
        }
 
        ret = setup_nt_fields(io);
-       if (ret != 0) {
+       if (ret != LDB_SUCCESS) {
                return ret;
        }
 
        ret = setup_lm_fields(io);
-       if (ret != 0) {
+       if (ret != LDB_SUCCESS) {
                return ret;
        }
 
        ret = setup_supplemental_field(io);
-       if (ret != 0) {
+       if (ret != LDB_SUCCESS) {
                return ret;
        }
 
        ret = setup_last_set_field(io);
-       if (ret != 0) {
+       if (ret != LDB_SUCCESS) {
                return ret;
        }
 
        ret = setup_kvno_field(io);
-       if (ret != 0) {
+       if (ret != LDB_SUCCESS) {
                return ret;
        }
 
@@ -1649,6 +1649,7 @@ static int get_domain_data_callback(struct ldb_request *req,
                if (ret != LDB_SUCCESS) {
                        return ldb_module_done(ac->req, NULL, NULL, ret);
                }
+               break;
 
        case LDB_REPLY_REFERRAL:
                /* ignore */