[master] dac871dc3 Always initialize req->req_body_status

Poul-Henning Kamp phk at FreeBSD.org
Fri Feb 21 05:22:09 UTC 2020


commit dac871dc33ef656c7c81fc988f2bd55b9f6722fa
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Feb 19 18:31:31 2020 +0000

    Always initialize req->req_body_status
    
    This worked only because REQ_BODY_INIT = 0
    
    I hate C enums.

diff --git a/bin/varnishd/cache/cache_req.c b/bin/varnishd/cache/cache_req.c
index 61c0182e8..305cea641 100644
--- a/bin/varnishd/cache/cache_req.c
+++ b/bin/varnishd/cache/cache_req.c
@@ -94,6 +94,7 @@ Req_New(const struct worker *wrk, struct sess *sp)
 	AN(req);
 	req->magic = REQ_MAGIC;
 	req->sp = sp;
+	req->req_body_status = REQ_BODY_INIT;
 
 	e = (char*)req + sz;
 	p = (char*)(req + 1);


More information about the varnish-commit mailing list