HSH_DerefObjCore signedness fix

noticed by Dridi here:
https://github.com/varnishcache/varnish-cache/pull/3434/commits/f9f40b991f301fb96d2e2d0d52b86c3d4b1f9f7f#r502302785

The reference count returned already is an unsigned value
parent f7cc84a7
...@@ -975,7 +975,7 @@ HSH_DerefBoc(struct worker *wrk, struct objcore *oc) ...@@ -975,7 +975,7 @@ HSH_DerefBoc(struct worker *wrk, struct objcore *oc)
* Returns zero if target was destroyed. * Returns zero if target was destroyed.
*/ */
int unsigned
HSH_DerefObjCore(struct worker *wrk, struct objcore **ocp, int rushmax) HSH_DerefObjCore(struct worker *wrk, struct objcore **ocp, int rushmax)
{ {
struct objcore *oc; struct objcore *oc;
......
...@@ -66,7 +66,7 @@ struct boc *HSH_RefBoc(const struct objcore *); ...@@ -66,7 +66,7 @@ struct boc *HSH_RefBoc(const struct objcore *);
void HSH_DerefBoc(struct worker *wrk, struct objcore *); void HSH_DerefBoc(struct worker *wrk, struct objcore *);
void HSH_DeleteObjHead(const struct worker *, struct objhead *); void HSH_DeleteObjHead(const struct worker *, struct objhead *);
int HSH_DerefObjCore(struct worker *, struct objcore **, int rushmax); unsigned HSH_DerefObjCore(struct worker *, struct objcore **, int rushmax);
#define HSH_RUSH_POLICY -1 #define HSH_RUSH_POLICY -1
enum lookup_e HSH_Lookup(struct req *, struct objcore **, struct objcore **); enum lookup_e HSH_Lookup(struct req *, struct objcore **, struct objcore **);
......
...@@ -259,7 +259,7 @@ VRB_Ignore(struct req *req) ...@@ -259,7 +259,7 @@ VRB_Ignore(struct req *req)
void void
VRB_Free(struct req *req) VRB_Free(struct req *req)
{ {
int r; unsigned r;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
...@@ -268,7 +268,6 @@ VRB_Free(struct req *req) ...@@ -268,7 +268,6 @@ VRB_Free(struct req *req)
r = HSH_DerefObjCore(req->wrk, &req->body_oc, 0); r = HSH_DerefObjCore(req->wrk, &req->body_oc, 0);
// each busyobj may have gained a reference // each busyobj may have gained a reference
assert (r <= req->restarts + 1); assert (r <= req->restarts + 1);
} }
......
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