s3:net ads join: untangle assignment from check.
authorMichael Adam <obnox@samba.org>
Mon, 30 Jan 2012 12:03:59 +0000 (13:03 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 31 Jan 2012 16:00:30 +0000 (17:00 +0100)
source3/utils/net_ads.c

index 0893a1d00dd2ff1bc67fa74dfcebeb9f2f3de178..9c3a0473c2253f919b6fd7f18c508dd59d08eb52 100644 (file)
@@ -1466,7 +1466,8 @@ int net_ads_join(struct net_context *c, int argc, const char **argv)
                /* We enter this block with user creds */
                ADS_STRUCT *ads_dns = NULL;
 
-               if ( (ads_dns = ads_init( lp_realm(), NULL, r->in.dc_name )) != NULL ) {
+               ads_dns = ads_init(lp_realm(), NULL, r->in.dc_name);
+               if (ads_dns != NULL) {
                        /* kinit with the machine password */
 
                        use_in_memory_ccache();