From b2d1f7890765fca5a119d43f4906e885c245005f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 12 May 2004 16:13:32 +0000 Subject: r655: Fix if() logic (This used to be commit 09096cfc3e1b35b4ac944cf84bfdec6ee44e06bf) --- source4/lib/registry/tools/regdiff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/registry') 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)); } -- cgit