Commit 5eb71249 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add some asserts for Flexelint and general paranoia

parent 95093730
......@@ -531,6 +531,10 @@ smp_allocobj(struct worker *wrk, const struct stevedore *stv,
ltot = sizeof(struct object) + PRNDUP(wsl);
ltot = IRNUP(sc, ltot);
st = NULL;
sg = NULL;
so = NULL;
objidx = 0;
for (; nuke_limit >= 0; nuke_limit--) {
st = smp_allocx(stv, ltot, ltot, &so, &objidx, &sg);
if (st != NULL && st->space < ltot) {
......@@ -544,6 +548,8 @@ smp_allocobj(struct worker *wrk, const struct stevedore *stv,
}
AN(st);
AN(sg);
AN(so);
assert(st->space >= ltot);
o = SML_MkObject(stv, oc, st->ptr);
......
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