t->b = t->e;
}
}
-
-#ifdef WITHOUT_ASSERTS
-#define spassert(cond) ((void)(cond))
-#else
-void panic(const char *, int, const char *,
- const struct sess *, const char *, ...);
-#define spassert(cond) \
- do { \
- int ok = !!(cond); \
- if (!ok) \
- panic(__FILE__, __LINE__, __func__, sp, \
- "assertion failed: %s\n", #cond); \
- } while (0)
-#endif
-#define SPAZ(val) spassert((val) == 0)
-#define SPAN(val) spassert((val) != 0)
sp, (unsigned long)kp->data, kp->flags,
(kp->flags & EV_EOF) ? " EOF" : "");
- spassert(sp->id == kp->ident);
- spassert(sp->fd == sp->id);
+ assert(sp->id == kp->ident);
+ assert(sp->fd == sp->id);
if (kp->data > 0) {
i = HTC_Rx(sp->htc);
if (i == 0) {
* We hit a busy object, disembark worker thread and expect
* hash code to restart us, still in STP_LOOKUP, later.
*/
- spassert(sp->objhead != NULL);
+ assert(sp->objhead != NULL);
if (params->diag_bitmap & 0x20)
WSP(sp, SLT_Debug,
"on waiting list <%s>", sp->objhead->hash);
VSL_stats->n_objwrite++;
WRK_Write(sp->wrk, st->ptr, st->len);
}
- spassert(u == sp->obj->len);
+ assert(u == sp->obj->len);
if (sp->esis > 0)
WRK_Write(sp->wrk, "\r\n", -1);
}
sp->srcaddr = NULL;
return;
}
- SPAZ(sp->srcaddr);
+ AZ(sp->srcaddr);
u = crc32_l(sp->addr, strlen(sp->addr));
v = u % nsrchash;
ch = &srchash[v];
sm = sp->mem;
CHECK_OBJ_NOTNULL(sm, SESSMEM_MAGIC);
- SPAZ(sp->obj);
- SPAZ(sp->vcl);
+ AZ(sp->obj);
+ AZ(sp->vcl);
VSL_stats->n_sess--;
ses_relsrcaddr(sp);
assert(!isnan(b->first));