summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools/ldbtest.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-05-11 14:25:11 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-05-21 16:21:13 +0200
commite6c5e11116afb8e6f5c16267c62e90084ac7d4da (patch)
tree851c914f4efa6c14b4e6868edfdb22761a0225b6 /source4/lib/ldb/tools/ldbtest.c
parent5c4fabb08edfdc8e4da431927c5337e96988beef (diff)
downloadsamba-e6c5e11116afb8e6f5c16267c62e90084ac7d4da.tar.gz
samba-e6c5e11116afb8e6f5c16267c62e90084ac7d4da.tar.bz2
samba-e6c5e11116afb8e6f5c16267c62e90084ac7d4da.zip
ldb:ldbtest.c - make more use of LDB constants
Signed-off-by: Metze
Diffstat (limited to 'source4/lib/ldb/tools/ldbtest.c')
-rw-r--r--source4/lib/ldb/tools/ldbtest.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/ldb/tools/ldbtest.c b/source4/lib/ldb/tools/ldbtest.c
index 5270357bad..47b78364fa 100644
--- a/source4/lib/ldb/tools/ldbtest.c
+++ b/source4/lib/ldb/tools/ldbtest.c
@@ -126,7 +126,7 @@ static void add_records(struct ldb_context *ldb,
ldb_delete(ldb, msg.dn);
- if (ldb_add(ldb, &msg) != 0) {
+ if (ldb_add(ldb, &msg) != LDB_SUCCESS) {
printf("Add of %s failed - %s\n", name, ldb_errstring(ldb));
exit(LDB_ERR_OPERATIONS_ERROR);
}
@@ -183,7 +183,7 @@ static void modify_records(struct ldb_context *ldb,
vals[2].data = (uint8_t *)talloc_asprintf(tmp_ctx, "%s@other2.example.com", name);
vals[2].length = strlen((char *)vals[2].data);
- if (ldb_modify(ldb, &msg) != 0) {
+ if (ldb_modify(ldb, &msg) != LDB_SUCCESS) {
printf("Modify of %s failed - %s\n", name, ldb_errstring(ldb));
exit(LDB_ERR_OPERATIONS_ERROR);
}
@@ -213,7 +213,7 @@ static void delete_records(struct ldb_context *ldb,
printf("Deleting uid Test%d\r", i);
fflush(stdout);
- if (ldb_delete(ldb, dn) != 0) {
+ if (ldb_delete(ldb, dn) != LDB_SUCCESS) {
printf("Delete of %s failed - %s\n", ldb_dn_get_linearized(dn), ldb_errstring(ldb));
exit(LDB_ERR_OPERATIONS_ERROR);
}
@@ -343,7 +343,7 @@ static void start_test_index(struct ldb_context **ldb)
ldb_msg_add_string(msg, "uid", strdup("test"));
ldb_msg_add_string(msg, "objectClass", strdup("OpenLDAPperson"));
- if (ldb_add(*ldb, msg) != 0) {
+ if (ldb_add(*ldb, msg) != LDB_SUCCESS) {
printf("Add of %s failed - %s\n", ldb_dn_get_linearized(msg->dn), ldb_errstring(*ldb));
exit(LDB_ERR_OPERATIONS_ERROR);
}