From ae62d46a9fcfee9db177ddb3d0f1f2c28c889a35 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 30 Jan 2012 09:25:50 +1030 Subject: 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 --- lib/ldb-samba/ldb_wrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ldb-samba') 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"); } } -- cgit