diff --git a/usr.bin/tr/cset.c b/usr.bin/tr/cset.c index 8c95a90918c9..58a927c8b972 100644 --- a/usr.bin/tr/cset.c +++ b/usr.bin/tr/cset.c @@ -153,11 +153,11 @@ cset_in_hard(struct cset *cs, wchar_t ch) struct csclass *csc; for (csc = cs->cs_classes; csc != NULL; csc = csc->csc_next) - if ((csc->csc_invert ^ iswctype(ch, csc->csc_type)) != 0) + if (csc->csc_invert ^ (iswctype(ch, csc->csc_type) != 0)) return (cs->cs_invert ^ true); if (cs->cs_root != NULL) { cs->cs_root = cset_splay(cs->cs_root, ch); - return ((cs->cs_invert ^ cset_rangecmp(cs->cs_root, ch)) == 0); + return (cs->cs_invert ^ (cset_rangecmp(cs->cs_root, ch) == 0)); } return (cs->cs_invert ^ false); }