s3:services_db: untangle assignments from check in construct_service_sd().
authorMichael Adam <obnox@samba.org>
Sun, 19 Sep 2010 22:40:44 +0000 (00:40 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 21 Sep 2010 04:53:29 +0000 (06:53 +0200)
source3/services/services_db.c

index 0afc6c16b4c4b270f7ff5d9ab8952df15a6cdc5f..f3c550a91fc31ffbd9da12734a78dc861756b8cb 100644 (file)
@@ -114,13 +114,17 @@ static struct security_descriptor* construct_service_sd( TALLOC_CTX *ctx )
 
        /* create the security descriptor */
 
 
        /* create the security descriptor */
 
-       if ( !(theacl = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace)) )
+       theacl = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace);
+       if (theacl == NULL) {
                return NULL;
                return NULL;
+       }
 
 
-       if ( !(sd = make_sec_desc(ctx, SECURITY_DESCRIPTOR_REVISION_1,
-                                 SEC_DESC_SELF_RELATIVE, NULL, NULL, NULL,
-                                 theacl, &sd_size)) )
+       sd = make_sec_desc(ctx, SECURITY_DESCRIPTOR_REVISION_1,
+                          SEC_DESC_SELF_RELATIVE, NULL, NULL, NULL,
+                          theacl, &sd_size);
+       if (sd == NULL) {
                return NULL;
                return NULL;
+       }
 
        return sd;
 }
 
        return sd;
 }