summaryrefslogtreecommitdiff
path: root/source3/tdb/tdbtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/tdb/tdbtest.c')
-rw-r--r--source3/tdb/tdbtest.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/source3/tdb/tdbtest.c b/source3/tdb/tdbtest.c
index 2cc7e88729..9677515570 100644
--- a/source3/tdb/tdbtest.c
+++ b/source3/tdb/tdbtest.c
@@ -188,39 +188,34 @@ static int traverse_fn(TDB_CONTEXT *db, TDB_DATA key, TDB_DATA dbuf, void *state
static void merge_test()
{
- int klen, dlen;
- int i;
+ int klen, dlen;
+ int i;
char keys[5][2];
- TDB_DATA key, data;
-
+ TDB_DATA key, data;
+
for (i = 0; i < 5; i++) {
sprintf(keys[i], "%d", i);
- key.dptr = keys[i];
- key.dsize = 2;
-
- data.dptr = "test";
- data.dsize = 4;
-
- if (tdb_store(db, key, data, TDB_REPLACE) != 0) {
- fatal("tdb_store failed");
- }
+ key.dptr = keys[i];
+ key.dsize = 2;
+
+ data.dptr = "test";
+ data.dsize = 4;
+
+ if (tdb_store(db, key, data, TDB_REPLACE) != 0) {
+ fatal("tdb_store failed");
+ }
}
key.dptr = keys[0];
tdb_delete(db, key);
- tdb_printfreelist(db);
key.dptr = keys[4];
tdb_delete(db, key);
- tdb_printfreelist(db);
key.dptr = keys[2];
tdb_delete(db, key);
- tdb_printfreelist(db);
key.dptr = keys[1];
tdb_delete(db, key);
- tdb_printfreelist(db);
key.dptr = keys[3];
tdb_delete(db, key);
- tdb_printfreelist(db);
}
int main(int argc, char *argv[])