Commit 483bc965 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Flexelinting

parent 97781c12
......@@ -223,7 +223,7 @@ h2_error H2_Send(struct worker *, struct h2_req *,
/* cache_http2_proto.c */
struct h2_req * h2_new_req(const struct worker *, struct h2_sess *,
unsigned stream, struct req *);
void h2_del_req(struct worker *, struct h2_req *);
void h2_del_req(struct worker *, const struct h2_req *);
void h2_kill_req(struct worker *, const struct h2_sess *,
struct h2_req *, h2_error);
int h2_rxframe(struct worker *, struct h2_sess *);
......
......@@ -161,7 +161,7 @@ h2_new_req(const struct worker *wrk, struct h2_sess *h2,
}
void
h2_del_req(struct worker *wrk, struct h2_req *r2)
h2_del_req(struct worker *wrk, const struct h2_req *r2)
{
struct h2_sess *h2;
struct sess *sp;
......
......@@ -396,6 +396,10 @@ vmod_workspace_allocate(VRT_CTX, VCL_ENUM which, VCL_INT size)
size += WS_Reserve(ws, 0);
WS_Release(ws, 0);
}
if (size <= 0) {
VRT_fail(ctx, "Attempted negative WS allocation");
return;
}
s = WS_Alloc(ws, size);
if (!s)
return;
......
......@@ -151,7 +151,10 @@ vmod_workspace_alloc(VRT_CTX, VCL_ENUM which, VCL_INT size)
size += WS_Reserve(ws, 0);
WS_Release(ws, 0);
}
if (size <= 0) {
VRT_fail(ctx, "Attempted negative WS allocation");
return;
}
p = WS_Alloc(ws, size);
if (p == NULL)
VRT_fail(ctx, "vtc.workspace_alloc");
......
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