ldb:tools/cmdline.c + tools/ldbtest.c - make use of LDB result constants
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sun, 10 Apr 2011 17:35:22 +0000 (19:35 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 29 Apr 2011 17:05:04 +0000 (19:05 +0200)
Reviewed-by: abartlet
source4/lib/ldb/tools/cmdline.c
source4/lib/ldb/tools/ldbtest.c

index b2be54ebf9b73b44aedcbcaff89b41b7c5764704..c2599414b0a33a11d2f1e7ebaebf2fbf2449cc3d 100644 (file)
@@ -297,7 +297,7 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb,
        }
 
        /* now connect to the ldb */
-       if (ldb_connect(ldb, ret->url, flags, ret->options) != 0) {
+       if (ldb_connect(ldb, ret->url, flags, ret->options) != LDB_SUCCESS) {
                fprintf(stderr, "Failed to connect to %s - %s\n", 
                        ret->url, ldb_errstring(ldb));
                goto failed;
index a9d8fafe818da1f92c61cd87c36f1db26b47c982..5270357bad35bf9aecccdae0a152aa220333f8ab 100644 (file)
@@ -356,7 +356,7 @@ static void start_test_index(struct ldb_context **ldb)
        (*ldb) = ldb_init(options, NULL);
 
        ret = ldb_connect(*ldb, options->url, flags, NULL);
-       if (ret != 0) {
+       if (ret != LDB_SUCCESS) {
                printf("failed to connect to %s\n", options->url);
                exit(LDB_ERR_OPERATIONS_ERROR);
        }