On Mon, Sep 30, 2013 at 09:27:24PM +0300, Sergey Popovich wrote: > val_same() compares passed @v1 and @v2 and returns 1 if they are > same, 0 if not and 999 in case their types not comparable. > > Change pm_path_compare() to return 1 - if @m1 and @m2 are the same and > 0 overwise. Rename pm_path_compare() to pm_path_same() according to its > return values. Use it in val_same() to compare path masks.
Thanks, applied. Although with minor changes - val_same() is now supposed to work on all possible values as inputs, so it does not return CMP_ERROR (different types would return 0). > @@ -1478,31 +1505,8 @@ i_same(struct f_inst *f1, struct f_inst *f2) > } > break; > case 'C': - { > + if (!val_same(* (struct f_val *) f1->a1.p, * (struct f_val *) > f2->a1.p)) > + return 0; BTW, with your val_same() this code had a bug - CMP_ERROR from different types get converted to same. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santi...@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
signature.asc
Description: Digital signature