Skip to content

Commit

Permalink
Various nitpicking
Browse files Browse the repository at this point in the history
  • Loading branch information
bsdphk committed Nov 26, 2015
1 parent 0a18407 commit 1f1448d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions bin/varnishd/cache/cache_fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,7 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,

if (mode != VBF_BACKGROUND)
HSH_Ref(oc);
AZ(bo->fetch_objcore);
bo->fetch_objcore = oc;

AZ(bo->stale_oc);
Expand Down
3 changes: 1 addition & 2 deletions bin/varnishd/cache/cache_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ ObjIterBegin(struct worker *wrk, struct objcore *oc)
oi->oc = oc;
oi->obj = obj;
oi->wrk = wrk;
if (oc->objhead != NULL)
oi->bo = HSH_RefBusy(oc);
oi->bo = HSH_RefBusy(oc);
return (oi);
}

Expand Down
6 changes: 6 additions & 0 deletions bin/varnishd/cache/cache_req_body.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,12 @@ VRB_Cache(struct req *req, ssize_t maxsize)

} while (vfps == VFP_OK);
VFP_Close(vfc);
ObjTrimStore(req->wrk, req->body_oc);

/* XXX: check missing:
if (req->htc->content_length >= 0)
MUSTBE (req->req_bodybytes == req->htc->content_length);
*/

if (vfps == VFP_END) {
assert(req->req_bodybytes >= 0);
Expand Down
4 changes: 1 addition & 3 deletions bin/varnishd/mgt/mgt_acceptor.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,9 @@ mac_callback(void *priv, const struct suckaddr *sa)
CAST_OBJ_NOTNULL(mh, priv, MAC_HELP_MAGIC);

VTAILQ_FOREACH(ls, &heritage.socks, list) {
if (!VSA_Compare(sa, ls->addr)) {
if (!VSA_Compare(sa, ls->addr))
ARGV_ERR("-a arguments %s and %s have same address\n",
ls->name, mh->name);
return (-1);
}
}
ALLOC_OBJ(ls, LISTEN_SOCK_MAGIC);
AN(ls);
Expand Down

0 comments on commit 1f1448d

Please sign in to comment.