Commit 1e555c3a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

white-space anal-retentive fixup



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5127 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 8b995a8d
......@@ -241,7 +241,7 @@ n_arg_sock(const char *n_arg)
}
if (S_arg == NULL) {
p = VSM_Find_Chunk(vsd, "Arg", "-S", "", NULL);
if (p != NULL)
if (p != NULL)
S_arg = strdup(p);
}
sock = -1;
......@@ -250,7 +250,7 @@ n_arg_sock(const char *n_arg)
AN(p);
*p = '\0';
sock = cli_sock(T_arg, S_arg);
if (sock >= 0)
if (sock >= 0)
break;
T_arg = p + 1;
}
......
......@@ -77,7 +77,7 @@ struct vbp_target {
struct vrt_backend_probe probe;
int stop;
struct vsb *vsb;
char *req;
char *req;
int req_len;
char resp_buf[128];
......
......@@ -262,7 +262,7 @@ cnt_done(struct sess *sp)
WSL_Flush(sp->wrk, 0);
/* If we did an ESI include, don't mess up our state */
if (sp->esis > 0)
if (sp->esis > 0)
return (1);
memset(&sp->acct_req, 0, sizeof sp->acct_req);
......
......@@ -55,12 +55,12 @@ SVNID("$Id$")
#define VDI_DNS_MAX_CACHE 1024
#define VDI_DNS_GROUP_MAX_BACKENDS 1024
/* DNS Cache entry
/* DNS Cache entry
*/
struct vdi_dns_hostgroup {
unsigned magic;
#define VDI_DNSDIR_MAGIC 0x1bacab21
char *hostname;
char *hostname;
struct director *hosts[VDI_DNS_GROUP_MAX_BACKENDS];
unsigned nhosts;
unsigned next_host; /* Next to use...*/
......@@ -85,7 +85,7 @@ struct vdi_dns {
/* Compare an IPv4 backend to a IPv4 addr/len */
static int
vdi_dns_comp_addrinfo4(const struct backend *bp,
vdi_dns_comp_addrinfo4(const struct backend *bp,
const struct sockaddr_in *addr,
const socklen_t len)
{
......@@ -226,7 +226,7 @@ vdi_dns_cache_has(const struct sess *sp,
if (vdi_dns_groupmatch(hostgr, hostname)) {
ret = (vdi_dns_pick_host(sp, hostgr));
*backend = ret;
if (*backend != NULL)
if (*backend != NULL)
CHECK_OBJ_NOTNULL(*backend, DIRECTOR_MAGIC);
return 1;
}
......@@ -274,7 +274,7 @@ vdi_dns_cache_add(const struct sess *sp,
if (vdi_dns_cache_has(sp, vs, hostname, backend, 1))
return 1;
memset(&hint, 0, sizeof hint);
hint.ai_family = PF_UNSPEC;
hint.ai_socktype = SOCK_STREAM;
......@@ -311,7 +311,7 @@ vdi_dns_cache_add(const struct sess *sp,
new->nhosts = host;
vdi_dns_cache_list_add(sp, vs, new);
*backend = vdi_dns_pick_host(sp, new);
*backend = vdi_dns_pick_host(sp, new);
return 1;
}
......@@ -367,7 +367,7 @@ vdi_dns_find_backend(const struct sess *sp, struct vdi_dns *vs)
if (http_GetHdr(hp, H_Host, &p) == 0)
return (NULL);
/* We need a working copy since it's going to be modified */
/* We need a working copy since it's going to be modified */
strncpy(hostname, p, sizeof(hostname));
/* remove port-portion of the Host-header, if present. */
......@@ -399,7 +399,7 @@ vdi_dns_getfd(const struct director *director, struct sess *sp)
dir = vdi_dns_find_backend(sp, vs);
if (!dir || !VDI_Healthy_sp(sp, dir))
return (NULL);
vbe = VDI_GetFd(dir, sp);
return (vbe);
}
......
......@@ -367,7 +367,6 @@ FetchHdr(struct sess *sp)
vc = sp->vbc;
if (vc->recycled)
retry = 1;
/*
* Now that we know our backend, we can set a default Host:
......
......@@ -305,7 +305,7 @@ ccf_config_use(struct cli *cli, const char * const *av, void *priv)
Lck_Unlock(&vcl_mtx);
/* Tickle this VCL's backends to take over health polling */
for(i = 1; i < vcl->conf->ndirector; i++)
for(i = 1; i < vcl->conf->ndirector; i++)
VBE_UseHealth(vcl->conf->director[i]);
}
......
......@@ -38,7 +38,7 @@
* |
* v
* Open old VSM,
* check pid --------> exit/fail (-n message)
* check pid --------> exit/fail (-n message)
* |
* +<----------------------+
* | ^
......@@ -81,7 +81,7 @@
* | |
* v |
* +-------------->+
*
*
*/
#include "config.h"
......
......@@ -277,7 +277,7 @@ mgt_run_cc(const char *vcl, struct vsb *sb, int C_flag)
(void)unlink(sf);
vsb_delete(cmdsb);
if (!i)
if (!i)
i = SUB_run(sb, run_dlopen, of, "dlopen", 10);
if (i) {
......
......@@ -223,7 +223,7 @@ do_curses(struct VSM_data *vd, const struct vsc_main *VSC_main,
AC(mvprintw(line, 0, " %010.10jx <",
(ju >> 24) & 0xffffffffffLL));
for (ch = 0x800000; ch; ch >>= 1)
if (ju & ch)
if (ju & ch)
AC(printw("V"));
else
AC(printw("_"));
......
......@@ -508,7 +508,7 @@ cmd_http_txresp(CMD_ARGS)
int bodylen = 0;
char *b, *c;
char *body = NULL, *nullbody;
(void)cmd;
(void)vl;
......
......@@ -54,7 +54,7 @@ struct VSM_data *VSM_New(void);
* You can have multiple active VSL_data handles at the same time
* referencing the same or different shared memory files.
* Returns:
* Pointer to usable VSL_data handle.
* Pointer to usable VSL_data handle.
*/
typedef void vsm_diag_f(void *priv, const char *fmt, ...);
......@@ -96,7 +96,7 @@ int VSM_Open(struct VSM_data *vd, int diag);
* If diag is non-zero, diagnostics are emitted.
* Returns:
* 0 on success
* != 0 on failure
* != 0 on failure
*/
int VSM_ReOpen(struct VSM_data *vd, int diag);
......@@ -161,7 +161,7 @@ void VSC_Setup(struct VSM_data *vd);
int VSC_Arg(struct VSM_data *vd, int arg, const char *opt);
/*
* Handle standard stat-presenter arguments
* Handle standard stat-presenter arguments
* Return:
* -1 error
* 0 not handled
......@@ -212,9 +212,9 @@ int VSL_Open(struct VSM_data *vd, int diag);
* If diag is non-zero, diagnostics are emitted.
* Returns:
* 0 on success
* != 0 on failure
* != 0 on failure
*/
#define VSL_ARGS "bCcdI:i:k:n:r:s:X:x:"
#define VSL_b_USAGE "[-b]"
#define VSL_c_USAGE "[-c]"
......@@ -229,18 +229,18 @@ int VSL_Open(struct VSM_data *vd, int diag);
#define VSL_x_USAGE "[-x tag]"
#define VSL_X_USAGE "[-X regexp]"
#define VSL_USAGE "[-bCcd] " \
VSL_i_USAGE " " \
VSL_i_USAGE " " \
VSL_I_USAGE " " \
VSL_k_USAGE " " \
VSL_n_USAGE " " \
VSL_r_USAGE " " \
VSL_s_USAGE " " \
VSL_X_USAGE " " \
VSL_x_USAGE
VSL_x_USAGE
int VSL_Arg(struct VSM_data *vd, int arg, const char *opt);
/*
* Handle standard log-presenter arguments
* Handle standard log-presenter arguments
* Return:
* -1 error
* 0 not handled
......
......@@ -110,7 +110,7 @@ vreadfile(const char *pfx, const char *fn)
else if (pfx != NULL) {
bprintf(fnb, "/%s/%s", pfx, fn); /* XXX: graceful length check */
fd = open(fnb, O_RDONLY);
} else
} else
fd = open(fn, O_RDONLY);
if (fd < 0)
return (NULL);
......
......@@ -66,7 +66,7 @@ void
VSL_Setup(struct VSM_data *vd)
{
struct vsl *vsl;
CHECK_OBJ_NOTNULL(vd, VSM_MAGIC);
AZ(vd->vsc);
AZ(vd->vsl);
......
......@@ -578,7 +578,7 @@ vcc_ParseHostDef(struct vcc *tl, int serial, const char *vgcname)
/* Check that the hostname makes sense */
assert(t_host != NULL);
if (t_port != NULL)
if (t_port != NULL)
Emit_Sockaddr(tl, t_host, t_port->dec);
else
Emit_Sockaddr(tl, t_host, "80");
......
......@@ -139,7 +139,7 @@ print_backend(struct vcc *tl,
* uint8_ts.
*/
static void
vcc_dir_dns_makebackend(struct vcc *tl,
vcc_dir_dns_makebackend(struct vcc *tl,
int *serial,
const unsigned char a[],
int inmask)
......
......@@ -309,7 +309,7 @@ vcc_Expr1(struct vcc *tl, enum var_type fmt)
vcc_ErrWhere(tl, top);
return;
}
} else
} else
break;
lfmt = afmt;
}
......
......@@ -225,7 +225,7 @@ vcc_Cond_2(struct vcc *tl)
vcc_Cond_3(tl);
Fb(tl, 1, ")\n");
return;
}
}
vsb_printf(tl->sb,
"Syntax error in condition.\n"
"Expected '(', '!' or variable name.\n"
......
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