s3:winbind:idmap_tdb_common: improve readability of assignment by adding an "if"
authorMichael Adam <obnox@samba.org>
Wed, 19 Sep 2012 00:57:37 +0000 (02:57 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 20 Sep 2012 03:20:38 +0000 (05:20 +0200)
in idmap_tdb_common_sids_to_unixids()

source3/winbindd/idmap_tdb_common.c

index b232729763c99ee9c5ea131d028c3c93fffe8e8b..5713fe2f4fb533a7366b13026aaf4990833ceaec 100644 (file)
@@ -638,9 +638,11 @@ NTSTATUS idmap_tdb_common_sids_to_unixids(struct idmap_domain * dom,
        state.dom = dom;
        state.ids = ids;
        state.allocate_unmapped = false;
-       state.sid_to_unixid_fn =
-           (ctx->sid_to_unixid_fn ==
-            NULL) ? idmap_tdb_common_sid_to_unixid : ctx->sid_to_unixid_fn;
+       if (ctx->sid_to_unixid_fn == NULL) {
+               state.sid_to_unixid_fn = idmap_tdb_common_sid_to_unixid;
+       } else {
+               state.sid_to_unixid_fn = ctx->sid_to_unixid_fn;
+       }
 
        ret = idmap_tdb_common_sids_to_unixids_action(ctx->db, &state);