]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tdb: Adapt tdb_rescue() to README.Coding
authorVolker Lendecke <vl@samba.org>
Mon, 1 Jul 2019 19:00:23 +0000 (21:00 +0200)
committerNoel Power <npower@samba.org>
Wed, 3 Jul 2019 08:55:23 +0000 (08:55 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
lib/tdb/common/rescue.c

index 7e6580957bb6fe695ff69777b3426d3c652302ae..e608db41deab4061b00fa469b8b5704ee993e8c8 100644 (file)
@@ -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? */