Browse Source

tdb2: fix tdb_check() return when free table entries missing.

It mistakenly returned -1 meaning "success".
Rusty Russell 15 years ago
parent
commit
dbbde01940
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ccan/tdb2/check.c

+ 1 - 1
ccan/tdb2/check.c

@@ -572,7 +572,7 @@ int tdb_check(struct tdb_context *tdb,
 	if (num_found != num_free) {
 	if (num_found != num_free) {
 		tdb->log(tdb, TDB_DEBUG_ERROR, tdb->log_priv,
 		tdb->log(tdb, TDB_DEBUG_ERROR, tdb->log_priv,
 			 "tdb_check: Not all entries are in free table\n");
 			 "tdb_check: Not all entries are in free table\n");
-		return false;
+		return -1;
 	}
 	}
 
 
 	tdb_allrecord_unlock(tdb, F_RDLCK);
 	tdb_allrecord_unlock(tdb, F_RDLCK);