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)
assert(ws->r == NULL);
if (ws->f + bytes > ws->e) {
WS_MarkOverflow(ws);
return(NULL);
return (NULL);
}
r = ws->f;
ws->f += bytes;
......@@ -159,7 +159,7 @@ WS_Copy(struct ws *ws, const void *str, int len)
bytes = PRNDUP((unsigned)len);
if (ws->f + bytes > ws->e) {
WS_MarkOverflow(ws);
return(NULL);
return (NULL);
}
r = ws->f;
ws->f += bytes;
......
......@@ -629,11 +629,10 @@ parse_x_format(char *buf)
if (!strncmp(buf, "VSL:", 4)) {
buf += 4;
e = buf;
while(*e != '\0')
while (*e != '\0')
e++;
if (e == buf) {
if (e == buf)
VUT_Error(1, "Missing tag in VSL:");
}
if (e[-1] == ']') {
r = e - 1;
while (r > buf && *r != '[')
......
......@@ -80,5 +80,5 @@ These rules are imported from the X11 project:
* Isolate complexity as much as possible.
* Provide mechanism, rather than policy.
* Provide mechanism, rather than policy.
......@@ -191,7 +191,7 @@ vmod_argtest(VRT_CTX, VCL_STRING one, VCL_REAL two, VCL_STRING three,
char buf[100];
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
......@@ -352,10 +352,10 @@ event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
{
switch (e) {
case VCL_EVENT_LOAD: return event_load(ctx, priv);
case VCL_EVENT_WARM: return event_warm(ctx, priv);
case VCL_EVENT_COLD: return event_cold(ctx, priv);
default: return (0);
case VCL_EVENT_LOAD: return event_load(ctx, priv);
case VCL_EVENT_WARM: return event_warm(ctx, priv);
case VCL_EVENT_COLD: return event_cold(ctx, priv);
default: return (0);
}
}
......@@ -367,16 +367,18 @@ vmod_sleep(VRT_CTX, VCL_DURATION t)
VTIM_sleep(t);
}
static struct ws *wsfind(VRT_CTX, VCL_ENUM which) {
if (!strcmp(which, "client")) {
return ctx->ws;
} else if (!strcmp(which, "backend")) {
return ctx->bo->ws;
} else if (!strcmp(which, "session")) {
return ctx->req->sp->ws;
} else if (!strcmp(which, "thread")) {
return ctx->req->wrk->aws;
} else
static struct ws *
wsfind(VRT_CTX, VCL_ENUM which)
{
if (!strcmp(which, "client"))
return (ctx->ws);
else if (!strcmp(which, "backend"))
return (ctx->bo->ws);
else if (!strcmp(which, "session"))
return (ctx->req->sp->ws);
else if (!strcmp(which, "thread"))
return (ctx->req->wrk->aws);
else
WRONG("No such workspace.");
}
......@@ -425,6 +427,7 @@ vmod_workspace_overflowed(VRT_CTX, VCL_ENUM which)
}
static char *debug_ws_snap;
void
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