]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/test/run-tdb1-no-lock-during-traverse.c
tdb2: unify tdb1_delete into tdb_delete.
[ccan] / ccan / tdb2 / test / run-tdb1-no-lock-during-traverse.c
index a418556d19c3f3df128bca7b8645d89ef291fecf..383b74cb87d59965b5ec194aa6cedac8a6a01c6d 100644 (file)
@@ -25,7 +25,7 @@ static bool prepare_entries(struct tdb_context *tdb)
                data.dsize = strlen("world");
                data.dptr = (void *)"world";
 
-               if (tdb1_store(tdb, key, data, 0) != 0)
+               if (tdb_store(tdb, key, data, 0) != TDB_SUCCESS)
                        return false;
        }
        return true;
@@ -40,7 +40,7 @@ static void delete_entries(struct tdb_context *tdb)
                key.dsize = sizeof(i);
                key.dptr = (void *)&i;
 
-               ok1(tdb1_delete(tdb, key) == 0);
+               ok1(tdb_delete(tdb, key) == TDB_SUCCESS);
        }
 }
 
@@ -52,7 +52,7 @@ static int delete_other(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data,
        memcpy(&i, key.dptr, 4);
        i = (i + 1) % NUM_ENTRIES;
        key.dptr = (void *)&i;
-       if (tdb1_delete(tdb, key) != 0)
+       if (tdb_delete(tdb, key) != TDB_SUCCESS)
                (*(int *)private_data)++;
        return 0;
 }
@@ -60,7 +60,7 @@ static int delete_other(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data,
 static int delete_self(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data,
                        void *private_data)
 {
-       ok1(tdb1_delete(tdb, key) == 0);
+       ok1(tdb_delete(tdb, key) == TDB_SUCCESS);
        return 0;
 }