summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/common/transaction.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-02 18:56:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:45 -0500
commit769efdf048d80c4081487d555649de0f31738dd1 (patch)
tree538aa4fc93b57c463be8a87345bffed8aadc3a85 /source4/lib/tdb/common/transaction.c
parent3655b4ba757a1db84063907ba9a2c157aef9bdbb (diff)
downloadsamba-769efdf048d80c4081487d555649de0f31738dd1.tar.gz
samba-769efdf048d80c4081487d555649de0f31738dd1.tar.bz2
samba-769efdf048d80c4081487d555649de0f31738dd1.zip
r22041: merge trivial changes from samba3
metze (This used to be commit 902a76ca705f07c61f86a9ef1346583ba9d3157d)
Diffstat (limited to 'source4/lib/tdb/common/transaction.c')
-rw-r--r--source4/lib/tdb/common/transaction.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source4/lib/tdb/common/transaction.c b/source4/lib/tdb/common/transaction.c
index 5c94eb0afe..eb296206f9 100644
--- a/source4/lib/tdb/common/transaction.c
+++ b/source4/lib/tdb/common/transaction.c
@@ -39,7 +39,7 @@
by the header. This removes the need for extra journal files as
used by some other databases
- - dymacially allocated the transaction recover record, re-using it
+ - dynamically allocated the transaction recover record, re-using it
for subsequent transactions. If a larger record is needed then
tdb_free() the old record to place it on the normal tdb freelist
before allocating the new record
@@ -88,6 +88,12 @@
*/
+struct tdb_transaction_el {
+ struct tdb_transaction_el *next, *prev;
+ tdb_off_t offset;
+ tdb_len_t length;
+ unsigned char *data;
+};
/*
hold the context of any current transaction
@@ -105,12 +111,7 @@ struct tdb_transaction {
ordered, with first element at the front of the list. It
needs to be doubly linked as the read/write traversals need
to be backwards, while the commit needs to be forwards */
- struct tdb_transaction_el {
- struct tdb_transaction_el *next, *prev;
- tdb_off_t offset;
- tdb_len_t length;
- unsigned char *data;
- } *elements, *elements_last;
+ struct tdb_transaction_el *elements, *elements_last;
/* non-zero when an internal transaction error has
occurred. All write operations will then fail until the