Commit 3e3357f9 authored by Federico G. Schwindt's avatar Federico G. Schwindt

Mostly whitespace OCD

Reduces my stash list to 62 entries.
parent 9552aa16
...@@ -134,7 +134,7 @@ WS_Alloc(struct ws *ws, unsigned bytes) ...@@ -134,7 +134,7 @@ WS_Alloc(struct ws *ws, unsigned bytes)
assert(ws->r == NULL); assert(ws->r == NULL);
if (ws->f + bytes > ws->e) { if (ws->f + bytes > ws->e) {
WS_MarkOverflow(ws); WS_MarkOverflow(ws);
return(NULL); return (NULL);
} }
r = ws->f; r = ws->f;
ws->f += bytes; ws->f += bytes;
...@@ -159,7 +159,7 @@ WS_Copy(struct ws *ws, const void *str, int len) ...@@ -159,7 +159,7 @@ WS_Copy(struct ws *ws, const void *str, int len)
bytes = PRNDUP((unsigned)len); bytes = PRNDUP((unsigned)len);
if (ws->f + bytes > ws->e) { if (ws->f + bytes > ws->e) {
WS_MarkOverflow(ws); WS_MarkOverflow(ws);
return(NULL); return (NULL);
} }
r = ws->f; r = ws->f;
ws->f += bytes; ws->f += bytes;
......
...@@ -629,11 +629,10 @@ parse_x_format(char *buf) ...@@ -629,11 +629,10 @@ parse_x_format(char *buf)
if (!strncmp(buf, "VSL:", 4)) { if (!strncmp(buf, "VSL:", 4)) {
buf += 4; buf += 4;
e = buf; e = buf;
while(*e != '\0') while (*e != '\0')
e++; e++;
if (e == buf) { if (e == buf)
VUT_Error(1, "Missing tag in VSL:"); VUT_Error(1, "Missing tag in VSL:");
}
if (e[-1] == ']') { if (e[-1] == ']') {
r = e - 1; r = e - 1;
while (r > buf && *r != '[') while (r > buf && *r != '[')
......
...@@ -191,7 +191,7 @@ vmod_argtest(VRT_CTX, VCL_STRING one, VCL_REAL two, VCL_STRING three, ...@@ -191,7 +191,7 @@ vmod_argtest(VRT_CTX, VCL_STRING one, VCL_REAL two, VCL_STRING three,
char buf[100]; char buf[100];
bprintf(buf, "%s %g %s %s", one, two, three, comma); bprintf(buf, "%s %g %s %s", one, two, three, comma);
return WS_Copy(ctx->ws, buf, -1); return (WS_Copy(ctx->ws, buf, -1));
} }
VCL_INT VCL_INT
...@@ -367,16 +367,18 @@ vmod_sleep(VRT_CTX, VCL_DURATION t) ...@@ -367,16 +367,18 @@ vmod_sleep(VRT_CTX, VCL_DURATION t)
VTIM_sleep(t); VTIM_sleep(t);
} }
static struct ws *wsfind(VRT_CTX, VCL_ENUM which) { static struct ws *
if (!strcmp(which, "client")) { wsfind(VRT_CTX, VCL_ENUM which)
return ctx->ws; {
} else if (!strcmp(which, "backend")) { if (!strcmp(which, "client"))
return ctx->bo->ws; return (ctx->ws);
} else if (!strcmp(which, "session")) { else if (!strcmp(which, "backend"))
return ctx->req->sp->ws; return (ctx->bo->ws);
} else if (!strcmp(which, "thread")) { else if (!strcmp(which, "session"))
return ctx->req->wrk->aws; return (ctx->req->sp->ws);
} else else if (!strcmp(which, "thread"))
return (ctx->req->wrk->aws);
else
WRONG("No such workspace."); WRONG("No such workspace.");
} }
...@@ -425,6 +427,7 @@ vmod_workspace_overflowed(VRT_CTX, VCL_ENUM which) ...@@ -425,6 +427,7 @@ vmod_workspace_overflowed(VRT_CTX, VCL_ENUM which)
} }
static char *debug_ws_snap; static char *debug_ws_snap;
void void
vmod_workspace_snap(VRT_CTX, VCL_ENUM which) vmod_workspace_snap(VRT_CTX, VCL_ENUM which)
{ {
......
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