summaryrefslogtreecommitdiff
path: root/lib/ldb-samba
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-01-30 09:25:50 +1030
committerRusty Russell <rusty@rustcorp.com.au>2012-01-30 09:25:50 +1030
commitae62d46a9fcfee9db177ddb3d0f1f2c28c889a35 (patch)
treeb477ab7c6636b224e6e15f13f3435e5317971047 /lib/ldb-samba
parentefbf52b4fe62eeed085961d7e2689b869bae63dc (diff)
downloadsamba-ae62d46a9fcfee9db177ddb3d0f1f2c28c889a35.tar.gz
samba-ae62d46a9fcfee9db177ddb3d0f1f2c28c889a35.tar.bz2
samba-ae62d46a9fcfee9db177ddb3d0f1f2c28c889a35.zip
ldb_wrap.c: fix TDB2-incompatible API usage.
Auditing revealed one place still expecting a -1 return on failure: tdb2 returns the (negative) errcode directly, so the portable way to do this is to check for != 0. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/ldb-samba')
-rw-r--r--lib/ldb-samba/ldb_wrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ldb-samba/ldb_wrap.c b/lib/ldb-samba/ldb_wrap.c
index 66213bf288..b8af8c151f 100644
--- a/lib/ldb-samba/ldb_wrap.c
+++ b/lib/ldb-samba/ldb_wrap.c
@@ -332,7 +332,7 @@ int samba_ldb_connect(struct ldb_context *ldb, struct loadparm_context *lp_ctx,
}
}
- if (tdb_reopen_all(1) == -1) {
+ if (tdb_reopen_all(1) != 0) {
smb_panic("tdb_reopen_all failed\n");
}
}