s4-dsdb: use ldb_operr() in the dsdb code
[metze/samba/wip.git] / source4 / dsdb / samdb / ldb_modules / naming_fsmo.c
index 3a10a604ec60af1b31d9e0043f08b9d0a198f920..5023657d865ad480ede48d53485e7c8bd42d00bf 100644 (file)
@@ -47,8 +47,7 @@ static int naming_fsmo_init(struct ldb_module *module)
 
        mem_ctx = talloc_new(module);
        if (!mem_ctx) {
-               ldb_oom(ldb);
-               return LDB_ERR_OPERATIONS_ERROR;
+               return ldb_oom(ldb);
        }
 
        naming_dn = samdb_partitions_dn(ldb, mem_ctx);
@@ -61,8 +60,7 @@ static int naming_fsmo_init(struct ldb_module *module)
 
        naming_fsmo = talloc_zero(mem_ctx, struct dsdb_naming_fsmo);
        if (!naming_fsmo) {
-               ldb_oom(ldb);
-               return LDB_ERR_OPERATIONS_ERROR;
+               return ldb_oom(ldb);
        }
        ldb_module_set_private(module, naming_fsmo);
 
@@ -84,8 +82,7 @@ static int naming_fsmo_init(struct ldb_module *module)
        }
 
        if (ldb_set_opaque(ldb, "dsdb_naming_fsmo", naming_fsmo) != LDB_SUCCESS) {
-               ldb_oom(ldb);
-               return LDB_ERR_OPERATIONS_ERROR;
+               return ldb_oom(ldb);
        }
 
        talloc_steal(module, naming_fsmo);