Commit a96736ac authored by Nils Goroll's avatar Nils Goroll

save one strlen()

parent fe39c7da
Pipeline #275 skipped
......@@ -158,7 +158,8 @@ match(VRT_CTX, vre_t *vre, VCL_STRING subject, struct vmod_priv *task)
CAST_OBJ(ov, task->priv, OV_MAGIC);
}
s = VRE_exec(vre, subject, strlen(subject), 0, 0, nov, MAX_OV,
len = strlen(subject);
s = VRE_exec(vre, subject, len, 0, 0, nov, MAX_OV,
&cache_param->vre_limits);
if (s <= VRE_ERROR_NOMATCH) {
if (s < VRE_ERROR_NOMATCH)
......@@ -174,7 +175,6 @@ match(VRT_CTX, vre_t *vre, VCL_STRING subject, struct vmod_priv *task)
}
task->len = sizeof(*ov);
len = strlen(subject);
if (WS_Inside(ctx->ws, subject, subject + len))
ov->subject = subject;
else if ((ov->subject = WS_Copy(ctx->ws, (const void *) subject, len))
......
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