From 5a7874e119acbc80410b2f2c1847371236c22a56 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 20 Jun 2011 18:40:31 +0930 Subject: tdb_traverse/tdb_traverse_read: check returns for negative, not -1. TDB2 returns a negative error number on failure. This is compatible if we always check for < 0 instead of == -1. Also, there's no tdb_traverse_read in TDB2: we don't try to make traverse reliable any more, so there are no write locks anyway. Signed-off-by: Rusty Russell --- source3/groupdb/mapping_tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/groupdb') diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c index cf8857cda5..fc195cb348 100644 --- a/source3/groupdb/mapping_tdb.c +++ b/source3/groupdb/mapping_tdb.c @@ -960,7 +960,7 @@ static bool mapping_switch(const char *ldb_path) /* ldb is just a very fancy tdb, read out raw data and perform * conversion */ ret = tdb_traverse(ltdb, convert_ldb_record, NULL); - if (ret == -1) goto failed; + if (ret < 0) goto failed; if (ltdb) { tdb_close(ltdb); -- cgit