From 6bc59d77b64d1ecbe5c906ed2fa80a7b8ca5d420 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 20 Jun 2011 18:40:31 +0930 Subject: tdb_store: check returns for 0, not -1. TDB2 returns a negative error number on failure. This is compatible if we always check for != 0 instead of == -1. Signed-off-by: Rusty Russell --- source4/lib/ldb/ldb_tdb/ldb_tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/ldb/ldb_tdb/ldb_tdb.c') diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index 77a75a4504..436ef46b33 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -264,7 +264,7 @@ int ltdb_store(struct ldb_module *module, const struct ldb_message *msg, int flg } ret = tdb_store(ltdb->tdb, tdb_key, tdb_data, flgs); - if (ret == -1) { + if (ret != 0) { ret = ltdb_err_map(tdb_error(ltdb->tdb)); goto done; } -- cgit