From 4ef5a42ca2025b10674a4800d471ea29735c0906 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 1 Jul 2019 21:00:23 +0200 Subject: tdb: Adapt tdb_rescue() to README.Coding Signed-off-by: Volker Lendecke Reviewed-by: Noel Power --- lib/tdb/common/rescue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/tdb/common') diff --git a/lib/tdb/common/rescue.c b/lib/tdb/common/rescue.c index 7e6580957bb..e608db41dea 100644 --- a/lib/tdb/common/rescue.c +++ b/lib/tdb/common/rescue.c @@ -300,7 +300,7 @@ _PUBLIC_ int tdb_rescue(struct tdb_context *tdb, qsort(found.arr, found.num, sizeof(found.arr[0]), cmp_key); } - for (i = 0; found.arr && i < found.num; ) { + for (i = 0; (found.arr != NULL) && i < found.num; ) { unsigned int num, num_in_hash = 0; /* How many are identical? */ -- cgit v1.2.1