a small fix in regdiff.c

Stefan (metze) Metzmacher metze at samba.org
Fri Apr 30 15:46:29 GMT 2004


Hi Jelmer,

I got a warning from the compiler to better add () to this:

is this patch logical ok?

metze at routox:/home/Projects/samba/4.0/samba4-ci/source> svn diff
Index: lib/registry/tools/regdiff.c
===================================================================
--- lib/registry/tools/regdiff.c        (revision 423)
+++ lib/registry/tools/regdiff.c        (working copy)
@@ -59,7 +59,7 @@

         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));
                 }




-- 
metze

Stefan Metzmacher <metze at samba.org> www.samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20040430/ad2ae061/signature.bin


More information about the samba-technical mailing list