]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/io.c
gitify the tree, especially the web makefile.
[ccan] / ccan / tdb2 / io.c
index aa79def1e38cc5b49b500d1b513eb9dc446fbbb7..8f14d5b12e37563d101084e222c08d15b3fc0a4f 100644 (file)
@@ -73,7 +73,9 @@ static int tdb_oob(struct tdb_context *tdb, tdb_off_t len, bool probe)
        int ret;
 
        /* We can't hold pointers during this: we could unmap! */
-       assert(!tdb->direct_access || tdb_has_expansion_lock(tdb));
+       assert(!tdb->direct_access
+              || (tdb->flags & TDB_NOLOCK)
+              || tdb_has_expansion_lock(tdb));
 
        if (len <= tdb->map_size)
                return 0;
@@ -309,7 +311,8 @@ static int tdb_write(struct tdb_context *tdb, tdb_off_t off,
                        tdb->ecode = TDB_ERR_IO;
                        tdb->log(tdb, TDB_DEBUG_FATAL, tdb->log_priv,
                                 "tdb_write failed at %llu len=%llu (%s)\n",
-                                off, len, strerror(errno));
+                                (long long)off, (long long)len,
+                                strerror(errno));
                        return -1;
                }
        }