]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb: Improve coding style in ldb_kv_index_dn_simple()
authorAndrew Bartlett <abartlet@samba.org>
Wed, 26 Feb 2020 22:27:17 +0000 (11:27 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 28 Feb 2020 03:08:46 +0000 (03:08 +0000)
We avoid bare if conditions in Samba.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14299

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
lib/ldb/ldb_key_value/ldb_kv_index.c

index 4701bf92f68834deed6e4afdda7d0adc61bc50b3..2935b95c4ddce0e230d4e9a142b614043993e677 100644 (file)
@@ -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);