projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b210046
)
tdb2: remove zero-length write optimization.
author
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 1 Mar 2011 12:49:18 +0000
(23:19 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 1 Mar 2011 12:49:18 +0000
(23:19 +1030)
If benchmarking indicates a problem later, we can restore it.
ccan/tdb2/io.c
patch
|
blob
|
history
diff --git
a/ccan/tdb2/io.c
b/ccan/tdb2/io.c
index a9016c4f38ea17a3148d9585302eae792dadc05c..866ff085bb5e87b6e3463e016aa7202e800c4708 100644
(file)
--- a/
ccan/tdb2/io.c
+++ b/
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;