X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftdb1_tdb.c;h=0a4f8b5503a7841fe0420e523a27a3d3ae42fd31;hp=d7f518dce487c74a492c459b274d04d3fd9db803;hb=ceb2f3eacbad917ee990afbc3dd800bfb0607887;hpb=cc2d609dfca7192305ad477b8c2b52cfdc1aa9be diff --git a/ccan/tdb2/tdb1_tdb.c b/ccan/tdb2/tdb1_tdb.c index d7f518dc..0a4f8b55 100644 --- a/ccan/tdb2/tdb1_tdb.c +++ b/ccan/tdb2/tdb1_tdb.c @@ -732,7 +732,7 @@ int tdb1_wipe_all(struct tdb_context *tdb) tdb1_off_t recovery_head; tdb1_len_t recovery_size = 0; - if (tdb1_lockall(tdb) != 0) { + if (tdb_lockall(tdb) != TDB_SUCCESS) { return -1; } @@ -801,16 +801,11 @@ int tdb1_wipe_all(struct tdb_context *tdb) } } - if (tdb1_unlockall(tdb) != 0) { - tdb_logerr(tdb, tdb->last_error, TDB_LOG_ERROR, - "tdb1_wipe_all: failed to unlock"); - goto failed; - } - + tdb_unlockall(tdb); return 0; failed: - tdb1_unlockall(tdb); + tdb_unlockall(tdb); return -1; }