[master] 7c89c9688 Monday morning flexelinting & whitespace OCD
Poul-Henning Kamp
phk at FreeBSD.org
Mon Nov 25 09:18:08 UTC 2019
commit 7c89c96880ec445e673a3b31a69d4414ebf8432e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Nov 25 09:17:11 2019 +0000
Monday morning flexelinting & whitespace OCD
diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index 3e3b98cac..4b8a0bb0d 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -52,7 +52,7 @@ const struct vcltemp VCL_TEMP_BUSY[1] = {{ .name = "busy", .is_warm = 1 }};
const struct vcltemp VCL_TEMP_COOLING[1] = {{ .name = "cooling" }};
// not really a temperature
-const struct vcltemp VCL_TEMP_LABEL[1] = {{ .name = "label" }};
+static const struct vcltemp VCL_TEMP_LABEL[1] = {{ .name = "label" }};
/*
* XXX: Presently all modifications to this list happen from the
diff --git a/bin/varnishd/cache/cache_vcl.h b/bin/varnishd/cache/cache_vcl.h
index e6ac097c1..2c4c18016 100644
--- a/bin/varnishd/cache/cache_vcl.h
+++ b/bin/varnishd/cache/cache_vcl.h
@@ -32,7 +32,7 @@
*/
struct vfilter;
-struct vcltemp;;
+struct vcltemp;
VTAILQ_HEAD(vfilter_head, vfilter);
diff --git a/bin/varnishd/flint.lnt b/bin/varnishd/flint.lnt
index 74fb46180..3d682d52f 100644
--- a/bin/varnishd/flint.lnt
+++ b/bin/varnishd/flint.lnt
@@ -146,6 +146,8 @@
// cache_vcl.c
-esym(528, vcl_call_method) // Not referenced
+-esym(765, VCL_TEMP_*)
+-esym(759, VCL_TEMP_*)
-e441 // for clause irregularity: loop variable '___' not found in 2nd for expression
diff --git a/bin/varnishtest/tests/r02872.vtc b/bin/varnishtest/tests/r02872.vtc
index e7d1174fe..ac483a906 100644
--- a/bin/varnishtest/tests/r02872.vtc
+++ b/bin/varnishtest/tests/r02872.vtc
@@ -1,23 +1,22 @@
varnishtest "VSL quoted fields"
server s1 {
- rxreq
- txresp
+ rxreq
+ txresp
} -start
varnish v1 -vcl {
import std;
- backend be {
- .host = "${s1_sock}";
- .probe = { .interval = 1m; }
- }
+ backend be {
+ .host = "${s1_sock}";
+ .probe = { .interval = 1m; }
+ }
sub vcl_recv {
# a series of 3-fields log records
std.log({" custom log "ok" "});
std.log({" "valid" "fields" ok "});
std.log({" "missing""blank" ko "});
- std.log({" missing dquote "ko "});
- # "
+ std.log({" missing dquote "ko "}); # "
return (synth(200));
}
} -start
@@ -30,17 +29,17 @@ client c1 {
# records with malformed fields don't show up
shell -expect "2" {
- varnishlog -d -n ${v1_name} -g raw -q 'VCL_Log[3]' | wc -l
+ varnishlog -d -n ${v1_name} -g raw -q 'VCL_Log[3]' | wc -l
}
server s1 -wait
shell -expect "Went healthy" {
- varnishlog -d -n ${v1_name} -g raw \
- -q 'Backend_health[10] eq "HTTP/1.1 200 OK"'
+ varnishlog -d -n ${v1_name} -g raw \
+ -q 'Backend_health[10] eq "HTTP/1.1 200 OK"'
}
# s1 starts sick before the first probe request is made
shell -expect "Went sick" {
- varnishlog -d -n ${v1_name} -g raw -q 'Backend_health[10] eq ""'
+ varnishlog -d -n ${v1_name} -g raw -q 'Backend_health[10] eq ""'
}
diff --git a/include/tbl/sess_attr.h b/include/tbl/sess_attr.h
index e61365c4d..7702e463a 100644
--- a/include/tbl/sess_attr.h
+++ b/include/tbl/sess_attr.h
@@ -32,8 +32,8 @@
/*lint -save -e525 -e539 */
-// upper lower type len
-SESS_ATTR(TRANSPORT, transport, void, 0)
+// upper lower type len
+SESS_ATTR(TRANSPORT, transport, void, 0)
SESS_ATTR(REMOTE_ADDR, remote_addr, struct suckaddr, vsa_suckaddr_len)
SESS_ATTR(LOCAL_ADDR, local_addr, struct suckaddr, vsa_suckaddr_len)
SESS_ATTR(CLIENT_ADDR, client_addr, struct suckaddr, vsa_suckaddr_len)
diff --git a/lib/libvmod_vtc/vmod_vtc.c b/lib/libvmod_vtc/vmod_vtc.c
index 9370a403e..f7e58db5c 100644
--- a/lib/libvmod_vtc/vmod_vtc.c
+++ b/lib/libvmod_vtc/vmod_vtc.c
@@ -297,6 +297,7 @@ vmod_typesize(VRT_CTX, VCL_STRING s)
i += (l - a); /* align */
i += l;
}
+ AN(p);
a = i % p;
if (a != 0)
i += (p - a); /* pad */
More information about the varnish-commit
mailing list