Permalink
Browse files

Whitespace OCD

  • Loading branch information...
fgsch committed Nov 30, 2017
1 parent 752489b commit 208fb45005f5e7665d92516f1cdae20998c8d9d3
@@ -145,13 +145,13 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody)
if (DO_DEBUG(DBG_FLUSH_HEAD))
(void)V1L_Flush(req->wrk);
if (! sendbody || req->res_mode & RES_ESI)
if (!sendbody || req->res_mode & RES_ESI)
if (V1L_Close(req->wrk) && req->sp->fd >= 0) {
Req_Fail(req, SC_REM_CLOSE);
sendbody = 0;
}
if (! sendbody) {
if (!sendbody) {
AZ(req->wrk->v1l);
VDP_close(req);
return;
@@ -467,7 +467,7 @@ VPX_Send_Proxy(int fd, int version, const struct sess *sp)
AZ(VSB_finish(vsb));
(void)write(fd, VSB_data(vsb), VSB_len(vsb));
if (! DO_DEBUG(DBG_PROTOCOL)) {
if (!DO_DEBUG(DBG_PROTOCOL)) {
VSB_delete(vsb);
return;
}
@@ -98,7 +98,7 @@ This API space could also have been called 'inline', because it
is basically what you see in the C-source generated by VCC:
| Include files allowed:
|
|
| ``#include "vdef.h"``
| ``#include "vrt.h"``
| ``#include "vrt_obj.h"``
@@ -125,7 +125,7 @@ This API space provides access to everything in the ``VRT`` API
space plus the other exposed and supported APIs in varnishd.
| Include files allowed:
|
|
| ``#include "cache.h" // NB: includes vdef.h and vrt.h``
| ``#include "cache_backend.h"``
| ``#include "cache_director.h"``
@@ -46,7 +46,7 @@ See :ref:`vmod_purge(3)`.
VMOD vtc
--------
As long as we have had VMODs, we had an internal vmod called ``vmod_debug``
As long as we have had VMODs, we had an internal vmod called ``vmod_debug``
which was used with ``varnishtest`` to exercise the VMOD related parts of
``varnishd``. Over time this vmod grew other useful functions for writing
test-cases.
@@ -537,7 +537,7 @@ main(int argc, char **argv)
child(bh, n + 1, &u, &v);
}
for(j = 0; j < 2; j++) {
for (j = 0; j < 2; j++) {
/* First insert our N elements */
for (u = 0; u < N; u++) {
lr = VRND_RandomTestable() % R;
@@ -339,7 +339,7 @@ cls_feed(struct VCLS_fd *cfd, const char *p, const char *e)
cli = cfd->cli;
CHECK_OBJ_NOTNULL(cli, CLI_MAGIC);
for(;p < e; p++) {
for (;p < e; p++) {
if (cli->cmd == NULL && isspace(*p)) {
/* Ignore all leading space before cmd */
continue;
View
@@ -301,7 +301,7 @@ vsc_del_seg(const struct vsc *vsc, struct vsm *vsm, struct vsc_seg *sp)
AZ(VSM_Unmap(vsm, sp->fantom));
vjsn_delete(&sp->vj);
pp = sp->points;
for(u = 0; u < sp->npoints; u++, pp++) {
for (u = 0; u < sp->npoints; u++, pp++) {
if (vsc->fdestroy != NULL)
vsc->fdestroy(vsc->priv, &pp->point);
vsc_clean_point(pp);
@@ -381,7 +381,7 @@ vsc_iter_seg(const struct vsc *vsc, const struct vsc_seg *sp,
CHECK_OBJ_NOTNULL(sp, VSC_SEG_MAGIC);
AN(fiter);
pp = sp->points;
for(u = 0; u < sp->npoints && i == 0; u++, pp++) {
for (u = 0; u < sp->npoints && i == 0; u++, pp++) {
if (pp->name != NULL)
i = fiter(priv, &pp->point);
}
@@ -96,7 +96,7 @@ VSL_Glob2Tags(const char *glob, int l, VSL_tagfind_f *func, void *priv)
if (glob == e)
return (-1); // Empty pattern cannot match
for(p = glob; p < e; p++)
for (p = glob; p < e; p++)
if (*p == '*')
break;
@@ -119,7 +119,7 @@ VSL_Glob2Tags(const char *glob, int l, VSL_tagfind_f *func, void *priv)
l2 = e - p2;
}
for(p++; p < e; p++)
for (p++; p < e; p++)
if (*p == '*')
return (-3); // More than one wildcard
View
@@ -137,7 +137,7 @@ url_decode(const enum encoding dec, char *restrict const buf,
while (*s && len) {
uint8_t nib2;
switch(state) {
switch (state) {
case NORMAL:
if (*s == '%')
state = PERCENT;
@@ -141,7 +141,7 @@ decode_l_va(enum encoding dec, const char * const p, va_list ap)
static void
err_decode(VRT_CTX, const char *enc)
{
switch(errno) {
switch (errno) {
case EINVAL:
ERRINVAL(ctx, enc);
break;
@@ -156,7 +156,7 @@ err_decode(VRT_CTX, const char *enc)
static inline enum case_e
parse_case(VCL_ENUM case_s)
{
switch(*case_s) {
switch (*case_s) {
case 'D':
AZ(strcmp(case_s + 1, "EFAULT"));
return DEFAULT;

0 comments on commit 208fb45

Please sign in to comment.