noop refactor: invert condition

parent c250c9cd
......@@ -373,14 +373,14 @@ sfemem_objslim(struct worker *wrk, struct objcore *memoc)
const struct stvfe *stvfe = stv_stvfe(stv);
uint32_t xid;
/* NOOP unless drain */
if (! stvfe->shutdown || wrk->strangelove != (int)STVELOVE_IS_DRAIN)
return;
xid = (uint32_t)ObjGetXID(wrk, memoc);
/* for drain, mutate to exp object */
if (stvfe->shutdown && wrk->strangelove == (int)STVELOVE_IS_DRAIN) {
xid = (uint32_t)ObjGetXID(wrk, memoc);
sfemem_free(wrk, memoc);
mutate_to_sfeexp(memoc, xid);
sfemem_free(wrk, memoc);
mutate_to_sfeexp(memoc, xid);
return;
}
}
static void v_matchproto_(objfree_f)
......@@ -444,7 +444,7 @@ sfedsk_objslim(struct worker *wrk, struct objcore *dskoc)
const struct stvfe *stvfe = stv_stvfe(stv);
struct fcoc fcoc;
/* for drain, just mutate */
/* for drain, mutate to exp object */
if (stvfe->shutdown && wrk->strangelove == (int)STVELOVE_IS_DRAIN) {
LRU_Remove(dskoc);
mutate_to_sfeexp(dskoc, 42);
......
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