s3:registry untangle an assignment from the check in regkey_open_onelevel()
authorMichael Adam <obnox@samba.org>
Mon, 23 Apr 2012 13:30:38 +0000 (15:30 +0200)
committerAndreas Schneider <asn@samba.org>
Wed, 25 Apr 2012 12:31:12 +0000 (14:31 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
source3/registry/reg_api.c

index 0be1231b804db68ef72e2e30564b3f5839944c0a..ff70016ae25cde0996f3ed8f033fdf6d4d98985b 100644 (file)
@@ -196,7 +196,8 @@ static WERROR regkey_open_onelevel(TALLOC_CTX *mem_ctx,
 
        /* Look up the table of registry I/O operations */
 
-       if ( !(key->ops = reghook_cache_find( key->name )) ) {
+       key->ops = reghook_cache_find( key->name );
+       if (key->ops == NULL) {
                DEBUG(0,("reg_open_onelevel: Failed to assign "
                         "registry_ops to [%s]\n", key->name ));
                result = WERR_BADFILE;