projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d3832e
)
tdb2: don't return -1 (ie. TDB_ERR_CORRUPT) on transaction write fail.
author
Rusty Russell
<rusty@rustcorp.com.au>
Fri, 2 Sep 2011 06:13:20 +0000
(15:43 +0930)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Fri, 2 Sep 2011 06:13:20 +0000
(15:43 +0930)
A left-over -1 return; should be returning ecode (probably TDB_ERR_IO).
ccan/tdb2/transaction.c
patch
|
blob
|
history
diff --git
a/ccan/tdb2/transaction.c
b/ccan/tdb2/transaction.c
index 64bd5366ebeb03d72d58c4f3121d18e61b1cf2fe..1f5709bf437468ccb082085de0747952ee931149 100644
(file)
--- a/
ccan/tdb2/transaction.c
+++ b/
ccan/tdb2/transaction.c
@@
-203,7
+203,7
@@
static enum TDB_ERROR transaction_write(struct tdb_context *tdb, tdb_off_t off,
tdb_len_t len2 = PAGESIZE - (off % PAGESIZE);
ecode = transaction_write(tdb, off, buf, len2);
if (ecode != TDB_SUCCESS) {
- return
-1
;
+ return
ecode
;
}
len -= len2;
off += len2;