r655: Fix if() logic
authorJelmer Vernooij <jelmer@samba.org>
Wed, 12 May 2004 16:13:32 +0000 (16:13 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:51:56 +0000 (12:51 -0500)
(This used to be commit 09096cfc3e1b35b4ac944cf84bfdec6ee44e06bf)

source4/lib/registry/tools/regdiff.c

index c3633ef0af19a25603a5368ec1b1eab0a98befc1..888270f61fa0596771eece9688165b1eb8bb3c30 100644 (file)
@@ -24,7 +24,7 @@
 void writediff(REG_KEY *oldkey, REG_KEY *newkey, FILE *out)
 {
        int i;
-       REG_KEY *t1,*t2;
+       REG_KEY *t1, *t2;
        REG_VAL *v1, *v2;
        WERROR error1, error2;
 
@@ -59,7 +59,7 @@ void writediff(REG_KEY *oldkey, REG_KEY *newkey, FILE *out)
 
        for(i = 0; W_ERROR_IS_OK(error1 = reg_key_get_value_by_index(newkey, i, &v1)); i++) {
                error2 = reg_key_get_value_by_name(oldkey, reg_val_name(v1), &v2);
-               if (((W_ERROR_IS_OK(error2) && reg_val_size(v2) != reg_val_size(v1)) || memcmp(reg_val_data_blk(v1), reg_val_data_blk(v2), reg_val_size(v1))) 
+               if ((W_ERROR_IS_OK(error2) && (reg_val_size(v2) != reg_val_size(v1) || memcmp(reg_val_data_blk(v1), reg_val_data_blk(v2), reg_val_size(v1)))) 
                        || W_ERROR_EQUAL(error2, WERR_DEST_NOT_FOUND)) {
                        fprintf(out, "\"%s\"=%s:%s\n", reg_val_name(v1), str_regtype(reg_val_type(v1)), reg_val_data_string(v1));
                }