From: Andrew Bartlett Date: Wed, 26 Feb 2020 22:27:17 +0000 (+1300) Subject: ldb: Improve coding style in ldb_kv_index_dn_simple() X-Git-Tag: ldb-2.2.0~1546 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48cfb8458b0ff86e3a431240933caa02d64af82f;p=thirdparty%2Fsamba.git ldb: Improve coding style in ldb_kv_index_dn_simple() We avoid bare if conditions in Samba. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14299 Signed-off-by: Andrew Bartlett Reviewed-by: Gary Lockyer --- diff --git a/lib/ldb/ldb_key_value/ldb_kv_index.c b/lib/ldb/ldb_key_value/ldb_kv_index.c index 4701bf92f68..2935b95c4dd 100644 --- a/lib/ldb/ldb_key_value/ldb_kv_index.c +++ b/lib/ldb/ldb_key_value/ldb_kv_index.c @@ -1282,7 +1282,9 @@ static int ldb_kv_index_dn_simple(struct ldb_module *module, * as ltdb_search_indexed will filter out the wrong one in * ltdb_index_filter() which calls ldb_match_message(). */ - if (!dn) return LDB_ERR_OPERATIONS_ERROR; + if (!dn) { + return LDB_ERR_OPERATIONS_ERROR; + } ret = ldb_kv_dn_list_load(module, ldb_kv, dn, list, DN_LIST_WILL_BE_READ_ONLY);