r4920 - in trunk/varnish-cache: bin/varnishd bin/varnishstat bin/varnishtest include lib/libvarnishapi lib/libvcl
phk at varnish-cache.org
phk at varnish-cache.org
Mon Jun 7 10:12:25 CEST 2010
Author: phk
Date: 2010-06-07 10:12:24 +0200 (Mon, 07 Jun 2010)
New Revision: 4920
Modified:
trunk/varnish-cache/bin/varnishd/cache.h
trunk/varnish-cache/bin/varnishd/cache_shmlog.c
trunk/varnish-cache/bin/varnishd/hash_critbit.c
trunk/varnish-cache/bin/varnishd/mgt_shmem.c
trunk/varnish-cache/bin/varnishd/mgt_vcc.c
trunk/varnish-cache/bin/varnishstat/varnishstat.c
trunk/varnish-cache/bin/varnishstat/varnishstat_curses.c
trunk/varnish-cache/bin/varnishtest/vtc_log.c
trunk/varnish-cache/bin/varnishtest/vtc_varnish.c
trunk/varnish-cache/include/shmlog.h
trunk/varnish-cache/include/vmb.h
trunk/varnish-cache/lib/libvarnishapi/vsl.c
trunk/varnish-cache/lib/libvarnishapi/vsl.h
trunk/varnish-cache/lib/libvarnishapi/vsl_log.c
trunk/varnish-cache/lib/libvarnishapi/vsl_stat.c
trunk/varnish-cache/lib/libvcl/generate.py
trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
Log:
Whitespace cleanup
Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/bin/varnishd/cache.h 2010-06-07 08:12:24 UTC (rev 4920)
@@ -225,7 +225,7 @@
struct VCL_conf *vcl;
- uint32_t *wlb, *wlp, *wle;
+ uint32_t *wlb, *wlp, *wle;
unsigned wlr;
struct SHA256Context *sha256ctx;
Modified: trunk/varnish-cache/bin/varnishd/cache_shmlog.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_shmlog.c 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/bin/varnishd/cache_shmlog.c 2010-06-07 08:12:24 UTC (rev 4920)
@@ -129,7 +129,7 @@
mlen = params->shm_reclen;
/* Truncate */
- if (len > mlen)
+ if (len > mlen)
len = mlen;
p = vsl_get(len, 1, 0);
Modified: trunk/varnish-cache/bin/varnishd/hash_critbit.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/hash_critbit.c 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/bin/varnishd/hash_critbit.c 2010-06-07 08:12:24 UTC (rev 4920)
@@ -428,7 +428,7 @@
unsigned with_lock;
(void)sp;
-
+
with_lock = 0;
while (1) {
if (with_lock) {
@@ -453,7 +453,7 @@
VSL_stats->hcb_insert++;
assert(oh->refcnt > 0);
return (oh);
- }
+ }
if (oh == NULL) {
assert(!with_lock);
Modified: trunk/varnish-cache/bin/varnishd/mgt_shmem.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_shmem.c 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/bin/varnishd/mgt_shmem.c 2010-06-07 08:12:24 UTC (rev 4920)
@@ -104,7 +104,7 @@
bprintf(sha->ident, "%s", ident);
VWMB();
- if (seq != 0)
+ if (seq != 0)
do
loghead->alloc_seq = seq++;
while (loghead->alloc_seq == 0);
@@ -207,7 +207,7 @@
av = ParseArgv(l_arg, ARGV_COMMA);
AN(av);
- if (av[0] != NULL)
+ if (av[0] != NULL)
ARGV_ERR("\t-l ...: %s", av[0]);
ap = av + 1;
@@ -249,7 +249,7 @@
fill = 1;
}
- if (*ap != NULL)
+ if (*ap != NULL)
ARGV_ERR("\t-l ...: Too many sub-args\n");
FreeArgv(av);
@@ -263,7 +263,7 @@
if (i >= 0) {
vsl_n_check(i);
(void)close(i);
- }
+ }
(void)close(i);
vsl_buildnew(fn, size, fill);
Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2010-06-07 08:12:24 UTC (rev 4920)
@@ -337,7 +337,7 @@
(void)f_arg;
if (L_arg && b_arg == NULL) {
- bprintf(buf,
+ bprintf(buf,
"backend default {\n"
" .host = \"127.0.0.1\";\n"
" .port = %s;\n"
Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c
===================================================================
--- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2010-06-07 08:12:24 UTC (rev 4920)
@@ -105,7 +105,7 @@
assert(!strcmp(pt->fmt, "uint64_t"));
val = *(const volatile uint64_t*)pt->ptr;
i = 0;
- if (strcmp(pt->class, ""))
+ if (strcmp(pt->class, ""))
i += printf("%s.", pt->class);
if (strcmp(pt->ident, ""))
i += printf("%s.", pt->ident);
@@ -113,7 +113,7 @@
if (i > op->pad)
op->pad = i + 1;
printf("%*.*s", op->pad - i, op->pad - i, "");
- if (pt->flag == 'a')
+ if (pt->flag == 'a')
printf("%12ju %12.2f %s\n", val, val / op->up, pt->desc);
else
printf("%12ju %12s %s\n", val, ". ", pt->desc);
@@ -141,7 +141,7 @@
(void)priv;
i = 0;
- if (strcmp(pt->class, ""))
+ if (strcmp(pt->class, ""))
i += fprintf(stderr, "%s.", pt->class);
if (strcmp(pt->ident, ""))
i += fprintf(stderr, "%s.", pt->ident);
Modified: trunk/varnish-cache/bin/varnishstat/varnishstat_curses.c
===================================================================
--- trunk/varnish-cache/bin/varnishstat/varnishstat_curses.c 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/bin/varnishstat/varnishstat_curses.c 2010-06-07 08:12:24 UTC (rev 4920)
@@ -209,7 +209,7 @@
AC(mvprintw(line, 0,
"%12ju %12.2f %12.2f %s\n",
ju, (ju - (intmax_t)pt->ref)/lt,
- ju / up, pt->name));
+ ju / up, pt->name));
pt->ref = ju;
} else {
AC(mvprintw(line, 0,
Modified: trunk/varnish-cache/bin/varnishtest/vtc_log.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_log.c 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/bin/varnishtest/vtc_log.c 2010-06-07 08:12:24 UTC (rev 4920)
@@ -187,7 +187,7 @@
l = 0;
for(; *str != '\0'; str++) {
if (++l > 512) {
- vsb_printf(vl->vsb, "...");
+ vsb_printf(vl->vsb, "...");
break;
}
if (nl) {
Modified: trunk/varnish-cache/bin/varnishtest/vtc_varnish.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_varnish.c 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/bin/varnishtest/vtc_varnish.c 2010-06-07 08:12:24 UTC (rev 4920)
@@ -81,7 +81,7 @@
int vcl_nbr;
char *workdir;
- struct VSL_data *vd;
+ struct VSL_data *vd;
};
static VTAILQ_HEAD(, varnish) varnishes =
@@ -645,7 +645,7 @@
char *p;
int i;
struct stat_priv sp;
-
+
good = -1;
sp.target = av[0];
Modified: trunk/varnish-cache/include/shmlog.h
===================================================================
--- trunk/varnish-cache/include/shmlog.h 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/include/shmlog.h 2010-06-07 08:12:24 UTC (rev 4920)
@@ -91,8 +91,8 @@
* whenever writing the log starts from the front.
*
* Each logrecord consist of:
- * [n] = ((type & 0xff) << 24) | (length & 0xffff)
- * [n + 1] = identifier
+ * [n] = ((type & 0xff) << 24) | (length & 0xffff)
+ * [n + 1] = identifier
* [n + 2] ... [m] = content
*/
Modified: trunk/varnish-cache/include/vmb.h
===================================================================
--- trunk/varnish-cache/include/vmb.h 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/include/vmb.h 2010-06-07 08:12:24 UTC (rev 4920)
@@ -56,9 +56,9 @@
#elif defined(__arm__)
-#define VMB()
-#define VWMB()
-#define VRMB()
+#define VMB()
+#define VWMB()
+#define VRMB()
#elif defined(__i386__) && defined(__GNUC__)
Modified: trunk/varnish-cache/lib/libvarnishapi/vsl.c
===================================================================
--- trunk/varnish-cache/lib/libvarnishapi/vsl.c 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/lib/libvarnishapi/vsl.c 2010-06-07 08:12:24 UTC (rev 4920)
@@ -104,7 +104,7 @@
free(vd->fname);
while(!VTAILQ_EMPTY(&vd->sf_list)) {
- sf = VTAILQ_FIRST(&vd->sf_list);
+ sf = VTAILQ_FIRST(&vd->sf_list);
VTAILQ_REMOVE(&vd->sf_list, sf, next);
free(sf->class);
free(sf->ident);
@@ -175,7 +175,7 @@
int
VSL_Open(struct VSL_data *vd)
{
-
+
return (vsl_open(vd, 1));
}
@@ -261,7 +261,7 @@
assert (vd->vsl_lh != NULL);
VSL_FOREACH(sha, vd) {
CHECK_OBJ_NOTNULL(sha, SHMALLOC_MAGIC);
- if (strcmp(sha->class, class))
+ if (strcmp(sha->class, class))
continue;
if (type != NULL && strcmp(sha->type, type))
continue;
Modified: trunk/varnish-cache/lib/libvarnishapi/vsl.h
===================================================================
--- trunk/varnish-cache/lib/libvarnishapi/vsl.h 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/lib/libvarnishapi/vsl.h 2010-06-07 08:12:24 UTC (rev 4920)
@@ -55,7 +55,7 @@
struct stat fstat;
int vsl_fd;
- struct shmloghead *vsl_lh;
+ struct shmloghead *vsl_lh;
void *vsl_end;
unsigned alloc_seq;
Modified: trunk/varnish-cache/lib/libvarnishapi/vsl_log.c
===================================================================
--- trunk/varnish-cache/lib/libvarnishapi/vsl_log.c 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/lib/libvarnishapi/vsl_log.c 2010-06-07 08:12:24 UTC (rev 4920)
@@ -127,7 +127,6 @@
continue;
}
-
/* XXX: check log_start[0] */
if (vd->flags & F_NON_BLOCKING)
return (-1);
Modified: trunk/varnish-cache/lib/libvarnishapi/vsl_stat.c
===================================================================
--- trunk/varnish-cache/lib/libvarnishapi/vsl_stat.c 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/lib/libvarnishapi/vsl_stat.c 2010-06-07 08:12:24 UTC (rev 4920)
@@ -65,7 +65,7 @@
* -1 -> unknown stats encountered.
*/
-static inline int
+static inline int
iter_test(const char *s1, const char *s2, int wc)
{
Modified: trunk/varnish-cache/lib/libvcl/generate.py
===================================================================
--- trunk/varnish-cache/lib/libvcl/generate.py 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/lib/libvcl/generate.py 2010-06-07 08:12:24 UTC (rev 4920)
@@ -381,10 +381,10 @@
'HDR_OBJ': "const char *",
'HDR_REQ': "const char *",
'HDR_BEREQ': "const char *",
- 'HOSTNAME': "const char *",
- 'PORTNAME': "const char *",
- 'HASH': "const char *",
- 'SET': "struct vrt_backend_entry *",
+ 'HOSTNAME': "const char *",
+ 'PORTNAME': "const char *",
+ 'HASH': "const char *",
+ 'SET': "struct vrt_backend_entry *",
}
#######################################################################
@@ -443,9 +443,11 @@
l = len(j)
while (k < l):
fo.write("p[%d] == '%s'" % (k, j[k]))
- fo.write(" && ")
+ fo.write(" &&")
if (k % 3) == 0:
fo.write("\n\t\t ")
+ else:
+ fo.write(" ")
k += 1
fo.write("!isvar(p[%d])) {\n" % l)
fo.write("\t\t\t*q = p + %d;\n" % l)
Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2010-06-07 08:02:53 UTC (rev 4919)
+++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2010-06-07 08:12:24 UTC (rev 4920)
@@ -68,25 +68,25 @@
M2('>', T_SHR);
M1();
case 'e':
- if (p[1] == 'l' && p[2] == 's' && p[3] == 'e' &&
+ if (p[1] == 'l' && p[2] == 's' && p[3] == 'e' &&
p[4] == 'i' && p[5] == 'f' && !isvar(p[6])) {
*q = p + 6;
return (T_ELSEIF);
}
- if (p[1] == 'l' && p[2] == 's' && p[3] == 'i' &&
+ if (p[1] == 'l' && p[2] == 's' && p[3] == 'i' &&
p[4] == 'f' && !isvar(p[5])) {
*q = p + 5;
return (T_ELSIF);
}
- if (p[1] == 'l' && p[2] == 's' && p[3] == 'e' &&
+ if (p[1] == 'l' && p[2] == 's' && p[3] == 'e' &&
!isvar(p[4])) {
*q = p + 4;
return (T_ELSE);
}
return (0);
case 'i':
- if (p[1] == 'n' && p[2] == 'c' && p[3] == 'l' &&
- p[4] == 'u' && p[5] == 'd' && p[6] == 'e' &&
+ if (p[1] == 'n' && p[2] == 'c' && p[3] == 'l' &&
+ p[4] == 'u' && p[5] == 'd' && p[6] == 'e' &&
!isvar(p[7])) {
*q = p + 7;
return (T_INCLUDE);
More information about the varnish-commit
mailing list