git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5c4fabb
)
ldb:ldbtest.c - make more use of LDB constants
author
Matthias Dieter Wallnöfer
<mdw@samba.org>
Wed, 11 May 2011 12:25:11 +0000
(14:25 +0200)
committer
Matthias Dieter Wallnöfer
<mdw@samba.org>
Sat, 21 May 2011 14:21:13 +0000
(16:21 +0200)
Signed-off-by: Metze
source4/lib/ldb/tools/ldbtest.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/tools/ldbtest.c
b/source4/lib/ldb/tools/ldbtest.c
index 5270357bad35bf9aecccdae0a152aa220333f8ab..47b78364fa62ac0debdeb1013ece086d9f5049fe 100644
(file)
--- 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);
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);
}
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);
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);
}
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);
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);
}
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"));
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);
}
printf("Add of %s failed - %s\n", ldb_dn_get_linearized(msg->dn), ldb_errstring(*ldb));
exit(LDB_ERR_OPERATIONS_ERROR);
}