tdb2: remove zero-length write optimization.
[ccan] / ccan / tdb2 / io.c
index a9016c4f38ea17a3148d9585302eae792dadc05c..866ff085bb5e87b6e3463e016aa7202e800c4708 100644 (file)
@@ -236,11 +236,6 @@ static enum TDB_ERROR tdb_write(struct tdb_context *tdb, tdb_off_t off,
                                  "Write to read-only database");
        }
 
                                  "Write to read-only database");
        }
 
-       /* FIXME: Bogus optimization? */
-       if (len == 0) {
-               return TDB_SUCCESS;
-       }
-
        ecode = tdb->methods->oob(tdb, off + len, 0);
        if (ecode != TDB_SUCCESS) {
                return ecode;
        ecode = tdb->methods->oob(tdb, off + len, 0);
        if (ecode != TDB_SUCCESS) {
                return ecode;