From: Volker Lendecke Date: Mon, 1 Jul 2019 19:00:23 +0000 (+0200) Subject: tdb: Adapt tdb_rescue() to README.Coding X-Git-Tag: ldb-2.0.5~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4ef5a42ca2025b10674a4800d471ea29735c0906;p=thirdparty%2Fsamba.git tdb: Adapt tdb_rescue() to README.Coding Signed-off-by: Volker Lendecke Reviewed-by: Noel Power --- 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? */