Commit 465f313a authored by Geoff Simmons's avatar Geoff Simmons

Simplify a not-NULL check in the .match() implementation.

parent 3178d443
......@@ -260,7 +260,6 @@ vmod_set_match(VRT_CTX, struct vmod_selector_set *set, VCL_STRING subject)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(set, VMOD_SELECTOR_SET_MAGIC);
AN(set->origo);
AN(set->members);
if (subject == NULL) {
VERR(ctx, "%s.match(): subject string is NULL", set->vcl_name);
......@@ -286,6 +285,7 @@ vmod_set_match(VRT_CTX, struct vmod_selector_set *set, VCL_STRING subject)
subj = copy;
members = set->lomembers;
}
AN(members);
match = get_match_data(ctx, set, "match");
if ((idx = PT_Lookup(set->origo, members, subj)) == UINT_MAX) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment