Commit 948661aa authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

hash: Fix refcount type in HSH_DerefObjCore()

We want to avoid unsigned integers for reference counting since they
would hide underflows.
parent c582cefd
...@@ -981,7 +981,7 @@ HSH_DerefObjCore(struct worker *wrk, struct objcore **ocp, int rushmax) ...@@ -981,7 +981,7 @@ HSH_DerefObjCore(struct worker *wrk, struct objcore **ocp, int rushmax)
struct objcore *oc; struct objcore *oc;
struct objhead *oh; struct objhead *oh;
struct rush rush; struct rush rush;
unsigned r; int r;
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
TAKE_OBJ_NOTNULL(oc, ocp, OBJCORE_MAGIC); TAKE_OBJ_NOTNULL(oc, ocp, OBJCORE_MAGIC);
......
...@@ -269,7 +269,6 @@ VRB_Free(struct req *req) ...@@ -269,7 +269,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