[master] 64b233606 vcc_expr: Break down conditions for cmp operators
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Tue Jul 9 16:49:06 UTC 2024
commit 64b233606905039acecc4be58b28a51f5713202c
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Tue Jul 9 09:17:15 2024 +0200
vcc_expr: Break down conditions for cmp operators
diff --git a/lib/libvcc/vcc_expr.c b/lib/libvcc/vcc_expr.c
index 326e8b4b9..a0107474a 100644
--- a/lib/libvcc/vcc_expr.c
+++ b/lib/libvcc/vcc_expr.c
@@ -1261,11 +1261,13 @@ vcc_expr_cmp(struct vcc *tl, struct expr **e, vcc_type_t fmt)
tk = tl->t;
for (cp = vcc_cmps; cp->fmt != VOID; cp++) {
- if ((*e)->fmt == cp->fmt && tl->t->tok == cp->token) {
- AN(cp->func);
- cp->func(tl, e, cp);
- return;
- }
+ if (tl->t->tok != cp->token)
+ continue;
+ if ((*e)->fmt != cp->fmt)
+ continue;
+ AN(cp->func);
+ cp->func(tl, e, cp);
+ return;
}
switch (tk->tok) {
More information about the varnish-commit
mailing list