diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-05-12 16:13:32 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:51:56 -0500 |
commit | b2d1f7890765fca5a119d43f4906e885c245005f (patch) | |
tree | 6158966a7e2105c03d829b7aaa31b189f58abf37 /source4 | |
parent | b5edc0fc05e567fe2ec1a13bd49073f9496db14d (diff) | |
download | samba-b2d1f7890765fca5a119d43f4906e885c245005f.tar.gz samba-b2d1f7890765fca5a119d43f4906e885c245005f.tar.bz2 samba-b2d1f7890765fca5a119d43f4906e885c245005f.zip |
r655: Fix if() logic
(This used to be commit 09096cfc3e1b35b4ac944cf84bfdec6ee44e06bf)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/registry/tools/regdiff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c index c3633ef0af..888270f61f 100644 --- a/source4/lib/registry/tools/regdiff.c +++ b/source4/lib/registry/tools/regdiff.c @@ -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)); } |