diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:51:13 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:51:13 +0930 |
commit | 02f5b8fef868b7f77f1ac385740328757bff4d93 (patch) | |
tree | 5b3a4c3bb3d001bbcc08a0e9cc6968536a2b7d73 /lib/tdb2/test/run-tdb1-incompatible.c | |
parent | f68a56ce8f38cc1768d8c2dca84f456f4ecfc625 (diff) | |
download | samba-02f5b8fef868b7f77f1ac385740328757bff4d93.tar.gz samba-02f5b8fef868b7f77f1ac385740328757bff4d93.tar.bz2 samba-02f5b8fef868b7f77f1ac385740328757bff4d93.zip |
tdb2: unify tdb1_fetch into tdb_fetch
Switch on the TDB_VERSION1 flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 08c05da588018c6b76834e57b66d525546643708)
Diffstat (limited to 'lib/tdb2/test/run-tdb1-incompatible.c')
-rw-r--r-- | lib/tdb2/test/run-tdb1-incompatible.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/tdb2/test/run-tdb1-incompatible.c b/lib/tdb2/test/run-tdb1-incompatible.c index 13ec5d826f..d2e07107aa 100644 --- a/lib/tdb2/test/run-tdb1-incompatible.c +++ b/lib/tdb2/test/run-tdb1-incompatible.c @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) dumbhash_attr.base.next = &log_attr; dumbhash_attr.hash.fn = tdb1_dumb_hash; - plan_tests(38 * 2); + plan_tests(42 * 2); for (flags = 0; flags <= TDB_CONVERT; flags += TDB_CONVERT) { unsigned int rwmagic = TDB1_HASH_RWLOCK_MAGIC; @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) O_RDWR, 0600, &incompat_hash_attr); ok1(tdb); ok1(log_count == 0); - d = tdb1_fetch(tdb, d); + ok1(tdb_fetch(tdb, d, &d) == TDB_SUCCESS); ok1(d.dsize == 5); free(d.dptr); ok1(tdb1_check(tdb, NULL, NULL) == 0); @@ -153,7 +153,7 @@ int main(int argc, char *argv[]) O_RDWR, 0600, &jhash_attr); ok1(tdb); ok1(log_count == 0); - d = tdb1_fetch(tdb, d); + ok1(tdb1_fetch(tdb, d, &d) == TDB_SUCCESS); ok1(d.dsize == 5); free(d.dptr); ok1(tdb1_check(tdb, NULL, NULL) == 0); @@ -167,7 +167,7 @@ int main(int argc, char *argv[]) ok1(log_count == 0); d.dptr = (void *)"Hello"; d.dsize = 5; - d = tdb1_fetch(tdb, d); + ok1(tdb_fetch(tdb, d, &d) == TDB_SUCCESS); ok1(d.dsize == 5); free(d.dptr); ok1(tdb1_check(tdb, NULL, NULL) == 0); @@ -202,7 +202,7 @@ int main(int argc, char *argv[]) &dumbhash_attr); ok1(tdb); ok1(log_count == 0); - d = tdb1_fetch(tdb, d); + ok1(tdb1_fetch(tdb, d, &d) == TDB_SUCCESS); ok1(d.dsize == 5); free(d.dptr); ok1(tdb1_check(tdb, NULL, NULL) == 0); |