s3:idmap_ad: untangle two assignments from checks
authorMichael Adam <obnox@samba.org>
Tue, 22 Jun 2010 12:13:55 +0000 (14:13 +0200)
committerMichael Adam <obnox@samba.org>
Sat, 14 Aug 2010 00:10:56 +0000 (02:10 +0200)
source3/winbindd/idmap_ad.c

index 782578e2e350e666d6a13bcb57372b391557bdbe..a690fb2b3661f0cc68394e38905bf7255b574ee1 100644 (file)
@@ -202,12 +202,14 @@ static NTSTATUS idmap_ad_initialize(struct idmap_domain *dom,
        char *config_option;
        const char *schema_mode = NULL; 
 
-       if ( (ctx = TALLOC_ZERO_P(dom, struct idmap_ad_context)) == NULL ) {
+       ctx = TALLOC_ZERO_P(dom, struct idmap_ad_context);
+       if (ctx == NULL) {
                DEBUG(0, ("Out of memory!\n"));
                return NT_STATUS_NO_MEMORY;
        }
 
-       if ( (config_option = talloc_asprintf(ctx, "idmap config %s", dom->name)) == NULL ) {
+       config_option = talloc_asprintf(ctx, "idmap config %s", dom->name);
+       if (config_option == NULL) {
                DEBUG(0, ("Out of memory!\n"));
                talloc_free(ctx);
                return NT_STATUS_NO_MEMORY;