tdb_unlockall/tdb_unlockall_read: ignore return value.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 20 Jun 2011 09:18:35 +0000 (11:18 +0200)
TDB2 returns void here.  tdb_unlockall will *always* return with the
database unlocked, but it will complain via the log function if it wasn't
locked.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
source4/lib/ldb/ldb_tdb/ldb_tdb.c

index 77b4b24a2e7d319f17528c4c9e78dcbaba84d852..16e556d78d958ff67fb0e242f40afc0bb693757a 100644 (file)
@@ -111,7 +111,8 @@ int ltdb_unlock_read(struct ldb_module *module)
        void *data = ldb_module_get_private(module);
        struct ltdb_private *ltdb = talloc_get_type(data, struct ltdb_private);
        if (ltdb->in_transaction == 0 && ltdb->read_lock_count == 1) {
-               return tdb_unlockall_read(ltdb->tdb);
+               tdb_unlockall_read(ltdb->tdb);
+               return 0;
        }
        ltdb->read_lock_count--;
        return 0;