Browse Source

tdb2: remove zero-length write optimization.

If benchmarking indicates a problem later, we can restore it.
Rusty Russell 15 years ago
parent
commit
78bb1258f9
1 changed files with 0 additions and 5 deletions
  1. 0 5
      ccan/tdb2/io.c

+ 0 - 5
ccan/tdb2/io.c

@@ -236,11 +236,6 @@ static enum TDB_ERROR tdb_write(struct tdb_context *tdb, tdb_off_t off,
 				  "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;