summaryrefslogtreecommitdiffstats
path: root/ctdb/lib/tdb/include
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-10-22 00:09:43 +1030
committerStefan Metzmacher <metze@samba.org>2009-12-16 08:03:49 +0100
commit8dcc760f1e941473ffac82d021f69f866ebf45a6 (patch)
tree019e2441975e53ccd65daa9c6fa725e9b76b886c /ctdb/lib/tdb/include
parent7f857c4d148aa9ac553bf72dc9cc786926c7d070 (diff)
downloadsamba-8dcc760f1e941473ffac82d021f69f866ebf45a6.tar.gz
samba-8dcc760f1e941473ffac82d021f69f866ebf45a6.tar.xz
samba-8dcc760f1e941473ffac82d021f69f866ebf45a6.zip
lib/tdb: wean off TDB_ERRCODE.
It was a regrettable hack which I used to reduce line count in tdb; in fact it caused confusion as can be seen in this patch. In particular, ecode now needs to be set before TDB_LOG anyway, and having it exposed in the header is useless (the struct tdb_context isn't defined, so it's doubly useless). Also, we should never set errno, as io.c was doing. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (cherry picked from samba commit b77f41d58b05101e02d8ac0e54cb0e30807d89c2) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit a6620f6e74aadc708395b21b42303d1082192fcc)
Diffstat (limited to 'ctdb/lib/tdb/include')
-rw-r--r--ctdb/lib/tdb/include/tdb.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/ctdb/lib/tdb/include/tdb.h b/ctdb/lib/tdb/include/tdb.h
index ca23dde6c56..f8a6d43d217 100644
--- a/ctdb/lib/tdb/include/tdb.h
+++ b/ctdb/lib/tdb/include/tdb.h
@@ -49,8 +49,6 @@ extern "C" {
#define TDB_VOLATILE 256 /* Activate the per-hashchain freelist, default 5 */
#define TDB_ALLOW_NESTING 512 /* Allow transactions to nest */
-#define TDB_ERRCODE(code, ret) ((tdb->ecode = (code)), ret)
-
/* error codes */
enum TDB_ERROR {TDB_SUCCESS=0, TDB_ERR_CORRUPT, TDB_ERR_IO, TDB_ERR_LOCK,
TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOLOCK, TDB_ERR_LOCK_TIMEOUT,