ldb_tdb: consistently use ltdb->cache->attribute_indexes to determine if we have...
authorAndrew Bartlett <abartlet@samba.org>
Thu, 30 Mar 2017 00:21:34 +0000 (13:21 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 31 May 2017 04:34:26 +0000 (06:34 +0200)
commit29dc93298a61e3e344fef5606b59e4cae94e8c2f
treeedf11de1625191f1b90f76dacd4ed6dec473f1c4
parente1bc43dca19a9a6078bd10c0c91986287f58fd9a
ldb_tdb: consistently use ltdb->cache->attribute_indexes to determine if we have indexes

This is instead of checking the number of elements via ltdb->cache->indexlist->num_elements

In turn, this allows us to avoid fetching ltdb->cache->indexlist in the future

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
lib/ldb/ldb_tdb/ldb_index.c