]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
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_unixids_to_sids()

source3/winbindd/idmap_tdb_common.c

index 2b16d0ba31868c8a226dea41e933503a26ae08cd..b232729763c99ee9c5ea131d028c3c93fffe8e8b 100644 (file)
@@ -320,9 +320,11 @@ NTSTATUS idmap_tdb_common_unixids_to_sids(struct idmap_domain * dom,
            talloc_get_type_abort(dom->private_data,
                                  struct idmap_tdb_common_context);
 
-       unixid_to_sid_fn =
-           (ctx->unixid_to_sid_fn ==
-            NULL) ? idmap_tdb_common_unixid_to_sid : ctx->unixid_to_sid_fn;
+       if (ctx->unixid_to_sid_fn == NULL) {
+               unixid_to_sid_fn = idmap_tdb_common_unixid_to_sid;
+       } else {
+               unixid_to_sid_fn = ctx->unixid_to_sid_fn;
+       }
 
        /* initialize the status to avoid surprise */
        for (i = 0; ids[i]; i++) {