summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2008-09-25 12:21:28 +0200
committerSimo Sorce <idra@samba.org>2008-10-13 10:47:06 -0400
commit88f1d885eabc9a723351f38e9f2dc83933cfdea1 (patch)
treed6bcac1e403bf3896fa0f7c260c483fd7f0d6979 /source4/dsdb
parent092bb542da8ff9eef9a8a981e698a1bff60058af (diff)
downloadsamba-88f1d885eabc9a723351f38e9f2dc83933cfdea1.tar.gz
samba-88f1d885eabc9a723351f38e9f2dc83933cfdea1.tar.bz2
samba-88f1d885eabc9a723351f38e9f2dc83933cfdea1.zip
DSDB cosmetic patches: Some enhancements
Also, use the constants more in the "ldif_handlers" module.
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/proxy.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/proxy.c b/source4/dsdb/samdb/ldb_modules/proxy.c
index 932fd3bcb6..2ff42297b7 100644
--- a/source4/dsdb/samdb/ldb_modules/proxy.c
+++ b/source4/dsdb/samdb/ldb_modules/proxy.c
@@ -317,7 +317,7 @@ static int proxy_search_bytree(struct ldb_module *module, struct ldb_request *re
goto passthru;
}
- if (load_proxy_info(module) != 0) {
+ if (load_proxy_info(module) != LDB_SUCCESS) {
return LDB_ERR_OPERATIONS_ERROR;
}
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index d10c95eacb..f30748c85c 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -98,7 +98,7 @@ static int add_time_element(struct ldb_message *msg, const char *attr, time_t t)
return LDB_ERR_OPERATIONS_ERROR;
}
- if (ldb_msg_add_string(msg, attr, s) != 0) {
+ if (ldb_msg_add_string(msg, attr, s) != LDB_SUCCESS) {
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -121,7 +121,7 @@ static int add_uint64_element(struct ldb_message *msg, const char *attr, uint64_
return LDB_SUCCESS;
}
- if (ldb_msg_add_fmt(msg, attr, "%llu", (unsigned long long)v) != 0) {
+ if (ldb_msg_add_fmt(msg, attr, "%llu", (unsigned long long)v) != LDB_SUCCESS) {
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -270,7 +270,7 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req)
ac->schema = schema;
- if (ldb_msg_find_element(req->op.add.message, "objectGUID")) {
+ if (ldb_msg_find_element(req->op.add.message, "objectGUID") != NULL) {
ldb_debug_set(module->ldb, LDB_DEBUG_ERROR,
"replmd_add: it's not allowed to add an object with objectGUID\n");
return LDB_ERR_UNWILLING_TO_PERFORM;
@@ -495,7 +495,7 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req)
* - calculate the new replPropertyMetaData attribute
*/
- if (add_time_element(msg, "whenChanged", t) != 0) {
+ if (add_time_element(msg, "whenChanged", t) != LDB_SUCCESS) {
talloc_free(ac);
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -503,7 +503,7 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req)
/* Get a sequence number from the backend */
ret = ldb_sequence_number(module->ldb, LDB_SEQ_NEXT, &seq_num);
if (ret == LDB_SUCCESS) {
- if (add_uint64_element(msg, "uSNChanged", seq_num) != 0) {
+ if (add_uint64_element(msg, "uSNChanged", seq_num) != LDB_SUCCESS) {
talloc_free(ac);
return LDB_ERR_OPERATIONS_ERROR;
}