Commit 7ecee2f9 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Give struct ws the mini_obj treatment, not sure why I didn't before.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2189 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 839e4acd
......@@ -90,6 +90,8 @@ enum step {
*/
struct ws {
unsigned magic;
#define WS_MAGIC 0x35fac554
const char *id; /* identity */
char *s; /* (S)tart of buffer */
char *f; /* (F)ree pointer */
......
......@@ -56,7 +56,7 @@ void
WS_Assert(const struct ws *ws)
{
assert(ws != NULL);
CHECK_OBJ_NOTNULL(ws, WS_MAGIC);
WS_DEBUG((SLT_Debug, 0, "WS(%p = (%s, %p %u %u %u)",
ws, ws->id, ws->s, pdiff(ws->s, ws->f),
ws->r == NULL ? 0 : pdiff(ws->f, ws->r),
......@@ -79,6 +79,7 @@ WS_Init(struct ws *ws, const char *id, void *space, unsigned len)
WS_DEBUG((SLT_Debug, 0, "WS_Init(%p, \"%s\", %p, %u)", ws, id, space, len));
assert(space != NULL);
memset(ws, 0, sizeof *ws);
ws->magic = WS_MAGIC;
ws->s = space;
ws->e = ws->s + len;
ws->f = ws->s;
......
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