diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-01-14 12:34:08 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-02-09 18:59:18 +0100 |
commit | c3ca0b05e5e8070bbc4e760591671f97a558639d (patch) | |
tree | 860804c8aef8c04c0fd7c66be09579d5b05aba01 /source4/lib/ldb | |
parent | a0e576178b886a68af5b5fce7e315fda2516df6d (diff) | |
download | samba-c3ca0b05e5e8070bbc4e760591671f97a558639d.tar.gz samba-c3ca0b05e5e8070bbc4e760591671f97a558639d.tar.bz2 samba-c3ca0b05e5e8070bbc4e760591671f97a558639d.zip |
ldb:ldbadd tool - use LDB result constants for consistency
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r-- | source4/lib/ldb/tools/ldbadd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/ldb/tools/ldbadd.c b/source4/lib/ldb/tools/ldbadd.c index ab456f3d33..6706c8af26 100644 --- a/source4/lib/ldb/tools/ldbadd.c +++ b/source4/lib/ldb/tools/ldbadd.c @@ -57,7 +57,7 @@ static int process_file(struct ldb_context *ldb, FILE *f, unsigned int *count) struct ldb_control **req_ctrls = ldb_parse_control_strings(ldb, ldb, (const char **)options->controls); if (options->controls != NULL && req_ctrls== NULL) { printf("parsing controls failed: %s\n", ldb_errstring(ldb)); - return -1; + return LDB_ERR_OPERATIONS_ERROR; } @@ -102,14 +102,14 @@ int main(int argc, const char **argv) { struct ldb_context *ldb; unsigned int i, count = 0; - int ret=0; + int ret = LDB_SUCCESS; TALLOC_CTX *mem_ctx = talloc_new(NULL); ldb = ldb_init(mem_ctx, NULL); options = ldb_cmdline_process(ldb, argc, argv, usage); - if (ldb_transaction_start(ldb) != 0) { + if (ldb_transaction_start(ldb) != LDB_SUCCESS) { printf("Failed to start transaction: %s\n", ldb_errstring(ldb)); exit(1); } @@ -131,7 +131,7 @@ int main(int argc, const char **argv) } if (count != 0) { - if (ldb_transaction_commit(ldb) != 0) { + if (ldb_transaction_commit(ldb) != LDB_SUCCESS) { printf("Failed to commit transaction: %s\n", ldb_errstring(ldb)); exit(1); } |