summaryrefslogtreecommitdiff
path: root/lib/libc/regex/regcomp.c
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-01-03 17:07:59 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-01-03 17:07:59 +0000
commit35f2a9f2eafad7db7da441807265f80ec41edffd (patch)
treeb82189c5ac646c0a0326450d05aebb227769b967 /lib/libc/regex/regcomp.c
parent2ef6f246599a03be5832dadd32eb5157575890f6 (diff)
Make CHIN() Boolean-valued and use this to turn an expression with a
quintuple negation into one with a simple negation. From miod, ok millert
Diffstat (limited to 'lib/libc/regex/regcomp.c')
-rw-r--r--lib/libc/regex/regcomp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index c41970223f1..cf6acbb7d86 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: regcomp.c,v 1.42 2021/01/02 20:42:01 millert Exp $ */
+/* $OpenBSD: regcomp.c,v 1.43 2021/01/03 17:07:57 tb Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
@@ -1099,7 +1099,7 @@ freezeset(struct parse *p, cset *cs)
if (cs2->hash == h && cs2 != cs) {
/* maybe */
for (i = 0; i < css; i++)
- if (!!CHIN(cs2, i) != !!CHIN(cs, i))
+ if (CHIN(cs2, i) != CHIN(cs, i))
break; /* no */
if (i == css)
break; /* yes */