]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/io.c
tdb2: reduce transaction before writing to recovery area.
[ccan] / ccan / tdb2 / io.c
index 31756de341d8fd43d17a41d57c41284cbb650227..8c5f45f30827c9e722227e3787797288713e056e 100644 (file)
@@ -130,6 +130,7 @@ static enum TDB_ERROR tdb_oob(struct tdb_context *tdb, tdb_off_t len,
 /* Endian conversion: we only ever deal with 8 byte quantities */
 void *tdb_convert(const struct tdb_context *tdb, void *buf, tdb_len_t size)
 {
+       assert(size % 8 == 0);
        if (unlikely((tdb->flags & TDB_CONVERT)) && buf) {
                uint64_t i, *p = (uint64_t *)buf;
                for (i = 0; i < size / 8; i++)