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/printing/nt_printing_tdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/printing') diff --git a/source3/printing/nt_printing_tdb.c b/source3/printing/nt_printing_tdb.c index 8d8d6f7dc7..1361f4b3b3 100644 --- a/source3/printing/nt_printing_tdb.c +++ b/source3/printing/nt_printing_tdb.c @@ -266,7 +266,7 @@ static bool upgrade_to_version_4(void) talloc_destroy( ctx ); - return ( result != -1 ); + return ( result >= 0 ); } /******************************************************************* @@ -334,7 +334,7 @@ static bool upgrade_to_version_5(void) talloc_destroy( ctx ); - return ( result != -1 ); + return ( result >= 0 ); } bool nt_printing_tdb_upgrade(void) -- cgit