tests: now we run in tmp dir, always create temporary files in this dir.
[ccan] / ccan / tdb / traverse.c
index 1532c6b25029f20042411039d5fb98340bee060e..d329ef4da4030c095e530b0d7b05b344c2256305 100644 (file)
@@ -140,9 +140,9 @@ static tdb_off_t tdb_next_lock(struct tdb_context *tdb, struct tdb_traverse_lock
    if fn is NULL then it is not called
    a non-zero return value from fn() indicates that the traversal should stop
   */
-static int _tdb_traverse(struct tdb_context *tdb, 
-                        tdb_traverse_func fn, void *private_data,
-                        struct tdb_traverse_lock *tl)
+static int tdb_traverse_internal(struct tdb_context *tdb, 
+                                tdb_traverse_func fn, void *private_data,
+                                struct tdb_traverse_lock *tl)
 {
        TDB_DATA key, dbuf;
        struct tdb_record rec;
@@ -226,7 +226,7 @@ int tdb_traverse_read(struct tdb_context *tdb,
 
        tdb->traverse_read++;
        tdb_trace(tdb, "tdb_traverse_read_start");
-       ret = _tdb_traverse(tdb, fn, private_data, &tl);
+       ret = tdb_traverse_internal(tdb, fn, private_data, &tl);
        tdb->traverse_read--;
 
        tdb_transaction_unlock(tdb, F_RDLCK);
@@ -257,7 +257,7 @@ int tdb_traverse(struct tdb_context *tdb,
 
        tdb->traverse_write++;
        tdb_trace(tdb, "tdb_traverse_start");
-       ret = _tdb_traverse(tdb, fn, private_data, &tl);
+       ret = tdb_traverse_internal(tdb, fn, private_data, &tl);
        tdb->traverse_write--;
 
        tdb_transaction_unlock(tdb, F_WRLCK);