Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
5005595f
Commit
5005595f
authored
Mar 27, 2018
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace and related OCD
parent
77663a93
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
32 additions
and
30 deletions
+32
-30
cache_backend.c
bin/varnishd/cache/cache_backend.c
+4
-4
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+3
-3
cache_tcp_pool.c
bin/varnishd/cache/cache_tcp_pool.c
+2
-2
cache_vcl.c
bin/varnishd/cache/cache_vcl.c
+1
-1
cache_vrt_priv.c
bin/varnishd/cache/cache_vrt_priv.c
+2
-2
mgt_acceptor.c
bin/varnishd/mgt/mgt_acceptor.c
+8
-8
cache_proxy_proto.c
bin/varnishd/proxy/cache_proxy_proto.c
+1
-1
vtc.c
bin/varnishtest/vtc.c
+1
-2
vsb.c
lib/libvarnish/vsb.c
+2
-2
vcc_expr.c
lib/libvcc/vcc_expr.c
+1
-1
url.c
lib/libvmod_blob/url.c
+4
-4
vmod_debug_obj.c
lib/libvmod_debug/vmod_debug_obj.c
+3
-0
No files found.
bin/varnishd/cache/cache_backend.c
View file @
5005595f
...
@@ -443,11 +443,11 @@ VRT_new_backend_clustered(VRT_CTX, struct vsmw_cluster *vc,
...
@@ -443,11 +443,11 @@ VRT_new_backend_clustered(VRT_CTX, struct vsmw_cluster *vc,
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
vrt
,
VRT_BACKEND_MAGIC
);
CHECK_OBJ_NOTNULL
(
vrt
,
VRT_BACKEND_MAGIC
);
if
(
vrt
->
path
==
NULL
)
if
(
vrt
->
path
==
NULL
)
assert
(
vrt
->
ipv4_suckaddr
!=
NULL
assert
(
vrt
->
ipv4_suckaddr
!=
NULL
||
||
vrt
->
ipv6_suckaddr
!=
NULL
);
vrt
->
ipv6_suckaddr
!=
NULL
);
else
else
assert
(
vrt
->
ipv4_suckaddr
==
NULL
assert
(
vrt
->
ipv4_suckaddr
==
NULL
&&
&&
vrt
->
ipv6_suckaddr
==
NULL
);
vrt
->
ipv6_suckaddr
==
NULL
);
vcl
=
ctx
->
vcl
;
vcl
=
ctx
->
vcl
;
AN
(
vcl
);
AN
(
vcl
);
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
5005595f
...
@@ -186,9 +186,9 @@ cnt_deliver(struct worker *wrk, struct req *req)
...
@@ -186,9 +186,9 @@ cnt_deliver(struct worker *wrk, struct req *req)
assert
(
wrk
->
handling
==
VCL_RET_DELIVER
);
assert
(
wrk
->
handling
==
VCL_RET_DELIVER
);
if
(
req
->
esi_level
==
0
if
(
req
->
esi_level
==
0
&&
&&
http_IsStatus
(
req
->
resp
,
200
)
http_IsStatus
(
req
->
resp
,
200
)
&&
&&
req
->
http
->
conds
&&
RFC2616_Do_Cond
(
req
))
req
->
http
->
conds
&&
RFC2616_Do_Cond
(
req
))
http_PutResponse
(
req
->
resp
,
"HTTP/1.1"
,
304
,
NULL
);
http_PutResponse
(
req
->
resp
,
"HTTP/1.1"
,
304
,
NULL
);
req
->
req_step
=
R_STP_TRANSMIT
;
req
->
req_step
=
R_STP_TRANSMIT
;
...
...
bin/varnishd/cache/cache_tcp_pool.c
View file @
5005595f
...
@@ -656,8 +656,8 @@ VTP_Ref(const struct suckaddr *ip4, const struct suckaddr *ip6, const char *uds,
...
@@ -656,8 +656,8 @@ VTP_Ref(const struct suckaddr *ip4, const struct suckaddr *ip6, const char *uds,
struct
vtp_cs
vcs
;
struct
vtp_cs
vcs
;
const
struct
cp_methods
*
methods
;
const
struct
cp_methods
*
methods
;
assert
((
uds
!=
NULL
&&
ip4
==
NULL
&&
ip6
==
NULL
)
assert
((
uds
!=
NULL
&&
ip4
==
NULL
&&
ip6
==
NULL
)
||
||
(
uds
==
NULL
&&
(
ip4
!=
NULL
||
ip6
!=
NULL
)));
(
uds
==
NULL
&&
(
ip4
!=
NULL
||
ip6
!=
NULL
)));
INIT_OBJ
(
&
vcs
,
VTP_CS_MAGIC
);
INIT_OBJ
(
&
vcs
,
VTP_CS_MAGIC
);
vcs
.
ip4
=
ip4
;
vcs
.
ip4
=
ip4
;
vcs
.
ip6
=
ip6
;
vcs
.
ip6
=
ip6
;
...
...
bin/varnishd/cache/cache_vcl.c
View file @
5005595f
...
@@ -1132,7 +1132,7 @@ vcl_call_method(struct worker *wrk, struct req *req, struct busyobj *bo,
...
@@ -1132,7 +1132,7 @@ vcl_call_method(struct worker *wrk, struct req *req, struct busyobj *bo,
ctx
.
ws
=
req
->
ws
;
ctx
.
ws
=
req
->
ws
;
}
}
if
(
bo
!=
NULL
)
{
if
(
bo
!=
NULL
)
{
if
(
req
)
if
(
req
)
assert
(
method
==
VCL_MET_PIPE
);
assert
(
method
==
VCL_MET_PIPE
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
->
vcl
,
VCL_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
->
vcl
,
VCL_MAGIC
);
...
...
bin/varnishd/cache/cache_vrt_priv.c
View file @
5005595f
...
@@ -103,8 +103,8 @@ vrt_priv_dynamic(VRT_CTX, struct vrt_privs *vps, uintptr_t id,
...
@@ -103,8 +103,8 @@ vrt_priv_dynamic(VRT_CTX, struct vrt_privs *vps, uintptr_t id,
VTAILQ_FOREACH
(
vp
,
&
vps
->
privs
,
list
)
{
VTAILQ_FOREACH
(
vp
,
&
vps
->
privs
,
list
)
{
CHECK_OBJ_NOTNULL
(
vp
,
VRT_PRIV_MAGIC
);
CHECK_OBJ_NOTNULL
(
vp
,
VRT_PRIV_MAGIC
);
if
(
vp
->
vcl
==
ctx
->
vcl
&&
vp
->
id
==
id
if
(
vp
->
vcl
==
ctx
->
vcl
&&
vp
->
id
==
id
&&
&&
vp
->
vmod_id
==
vmod_id
)
vp
->
vmod_id
==
vmod_id
)
return
(
vp
->
priv
);
return
(
vp
->
priv
);
}
}
ALLOC_OBJ
(
vp
,
VRT_PRIV_MAGIC
);
ALLOC_OBJ
(
vp
,
VRT_PRIV_MAGIC
);
...
...
bin/varnishd/mgt/mgt_acceptor.c
View file @
5005595f
...
@@ -102,8 +102,8 @@ mac_opensocket(struct listen_sock *ls)
...
@@ -102,8 +102,8 @@ mac_opensocket(struct listen_sock *ls)
CHECK_OBJ
(
ls
->
perms
,
UDS_PERMS_MAGIC
);
CHECK_OBJ
(
ls
->
perms
,
UDS_PERMS_MAGIC
);
assert
(
ls
->
uds
);
assert
(
ls
->
uds
);
errno
=
0
;
errno
=
0
;
if
(
ls
->
perms
->
mode
!=
0
if
(
ls
->
perms
->
mode
!=
0
&&
&&
chmod
(
ls
->
endpoint
,
ls
->
perms
->
mode
)
!=
0
)
chmod
(
ls
->
endpoint
,
ls
->
perms
->
mode
)
!=
0
)
return
errno
;
return
errno
;
if
(
chown
(
ls
->
endpoint
,
ls
->
perms
->
uid
,
ls
->
perms
->
gid
)
!=
0
)
if
(
chown
(
ls
->
endpoint
,
ls
->
perms
->
uid
,
ls
->
perms
->
gid
)
!=
0
)
return
errno
;
return
errno
;
...
@@ -265,8 +265,8 @@ MAC_Arg(const char *spec)
...
@@ -265,8 +265,8 @@ MAC_Arg(const char *spec)
la
->
name
=
name
;
la
->
name
=
name
;
if
(
*
la
->
endpoint
!=
'/'
&&
strchr
(
la
->
endpoint
,
'/'
)
!=
NULL
)
if
(
*
la
->
endpoint
!=
'/'
&&
strchr
(
la
->
endpoint
,
'/'
)
!=
NULL
)
ARGV_ERR
(
"Unix domain socket addresses must be
absolute paths
"
ARGV_ERR
(
"Unix domain socket addresses must be"
"
in -a (%s)
\n
"
,
la
->
endpoint
);
" absolute paths
in -a (%s)
\n
"
,
la
->
endpoint
);
if
(
*
la
->
endpoint
==
'/'
&&
heritage
.
min_vcl
<
41
)
if
(
*
la
->
endpoint
==
'/'
&&
heritage
.
min_vcl
<
41
)
heritage
.
min_vcl
=
41
;
heritage
.
min_vcl
=
41
;
...
@@ -277,16 +277,16 @@ MAC_Arg(const char *spec)
...
@@ -277,16 +277,16 @@ MAC_Arg(const char *spec)
if
((
eq
=
strchr
(
av
[
i
],
'='
))
==
NULL
)
{
if
((
eq
=
strchr
(
av
[
i
],
'='
))
==
NULL
)
{
if
(
xp
!=
NULL
)
if
(
xp
!=
NULL
)
ARGV_ERR
(
"Too many protocol sub-args
in -a
"
ARGV_ERR
(
"Too many protocol sub-args"
"
(%s)
\n
"
,
av
[
i
]);
" in -a
(%s)
\n
"
,
av
[
i
]);
xp
=
XPORT_Find
(
av
[
i
]);
xp
=
XPORT_Find
(
av
[
i
]);
if
(
xp
==
NULL
)
if
(
xp
==
NULL
)
ARGV_ERR
(
"Unknown protocol '%s'
\n
"
,
av
[
i
]);
ARGV_ERR
(
"Unknown protocol '%s'
\n
"
,
av
[
i
]);
continue
;
continue
;
}
}
if
(
la
->
endpoint
[
0
]
!=
'/'
)
if
(
la
->
endpoint
[
0
]
!=
'/'
)
ARGV_ERR
(
"Invalid sub-arg %s for IP addresses
in -a
\n
"
,
ARGV_ERR
(
"Invalid sub-arg %s for IP addresses
"
av
[
i
]);
" in -a
\n
"
,
av
[
i
]);
val
=
eq
+
1
;
val
=
eq
+
1
;
len
=
eq
-
av
[
i
];
len
=
eq
-
av
[
i
];
...
...
bin/varnishd/proxy/cache_proxy_proto.c
View file @
5005595f
...
@@ -449,7 +449,7 @@ vpx_proto2(const struct worker *wrk, struct req *req)
...
@@ -449,7 +449,7 @@ vpx_proto2(const struct worker *wrk, struct req *req)
"PROXY2: Ignoring TLV"
);
"PROXY2: Ignoring TLV"
);
return
(
0
);
return
(
0
);
}
}
switch
(
d
[
0
])
{
switch
(
d
[
0
])
{
case
PP2_TYPE_CRC32C
:
case
PP2_TYPE_CRC32C
:
{
{
uint32_t
n_crc32c
=
vbe32dec
(
d
+
3
);
uint32_t
n_crc32c
=
vbe32dec
(
d
+
3
);
...
...
bin/varnishtest/vtc.c
View file @
5005595f
...
@@ -256,8 +256,7 @@ macro_expand(struct vtclog *vl, const char *text)
...
@@ -256,8 +256,7 @@ macro_expand(struct vtclog *vl, const char *text)
NEEDLESS
(
return
(
NULL
));
NEEDLESS
(
return
(
NULL
));
}
}
VSB_printf
(
vsb
,
"${%.*s}"
,
(
int
)(
q
-
p
),
p
);
VSB_printf
(
vsb
,
"${%.*s}"
,
(
int
)(
q
-
p
),
p
);
}
}
else
{
else
{
VSB_printf
(
vsb
,
"%s"
,
m
);
VSB_printf
(
vsb
,
"%s"
,
m
);
free
(
m
);
free
(
m
);
}
}
...
...
lib/libvarnish/vsb.c
View file @
5005595f
...
@@ -544,8 +544,8 @@ VSB_quote_pfx(struct vsb *s, const char *pfx, const void *v, int len, int how)
...
@@ -544,8 +544,8 @@ VSB_quote_pfx(struct vsb *s, const char *pfx, const void *v, int len, int how)
}
}
if
(
!
quote
&&
!
(
how
&
(
VSB_QUOTE_JSON
|
VSB_QUOTE_CSTR
)))
{
if
(
!
quote
&&
!
(
how
&
(
VSB_QUOTE_JSON
|
VSB_QUOTE_CSTR
)))
{
(
void
)
VSB_bcat
(
s
,
p
,
len
);
(
void
)
VSB_bcat
(
s
,
p
,
len
);
if
((
how
&
(
VSB_QUOTE_UNSAFE
|
VSB_QUOTE_NONL
))
if
((
how
&
(
VSB_QUOTE_UNSAFE
|
VSB_QUOTE_NONL
))
&&
&&
p
[
len
-
1
]
!=
'\n'
)
p
[
len
-
1
]
!=
'\n'
)
(
void
)
VSB_putc
(
s
,
'\n'
);
(
void
)
VSB_putc
(
s
,
'\n'
);
return
;
return
;
}
}
...
...
lib/libvcc/vcc_expr.c
View file @
5005595f
...
@@ -491,7 +491,7 @@ vcc_func(struct vcc *tl, struct expr **e, const void *priv,
...
@@ -491,7 +491,7 @@ vcc_func(struct vcc *tl, struct expr **e, const void *priv,
if
(
extra
==
NULL
)
if
(
extra
==
NULL
)
extra
=
""
;
extra
=
""
;
VTAILQ_INIT
(
&
head
);
VTAILQ_INIT
(
&
head
);
for
(;
vv
!=
NULL
;
vv
=
VTAILQ_NEXT
(
vv
,
list
))
{
for
(;
vv
!=
NULL
;
vv
=
VTAILQ_NEXT
(
vv
,
list
))
{
assert
(
vv
->
type
==
VJSN_ARRAY
);
assert
(
vv
->
type
==
VJSN_ARRAY
);
fa
=
calloc
(
1
,
sizeof
*
fa
);
fa
=
calloc
(
1
,
sizeof
*
fa
);
AN
(
fa
);
AN
(
fa
);
...
...
lib/libvmod_blob/url.c
View file @
5005595f
...
@@ -150,8 +150,8 @@ url_decode(const enum encoding dec, char *restrict const buf,
...
@@ -150,8 +150,8 @@ url_decode(const enum encoding dec, char *restrict const buf,
}
}
break
;
break
;
case
PERCENT
:
case
PERCENT
:
if
(
isoutofrange
(
*
s
)
if
(
isoutofrange
(
*
s
)
||
||
(
nib
=
nibble
[
*
s
-
'0'
])
==
ILL
)
{
(
nib
=
nibble
[
*
s
-
'0'
])
==
ILL
)
{
errno
=
EINVAL
;
errno
=
EINVAL
;
return
-
1
;
return
-
1
;
}
}
...
@@ -162,8 +162,8 @@ url_decode(const enum encoding dec, char *restrict const buf,
...
@@ -162,8 +162,8 @@ url_decode(const enum encoding dec, char *restrict const buf,
errno
=
ENOMEM
;
errno
=
ENOMEM
;
return
-
1
;
return
-
1
;
}
}
if
(
isoutofrange
(
*
s
)
if
(
isoutofrange
(
*
s
)
||
||
(
nib2
=
nibble
[
*
s
-
'0'
])
==
ILL
)
{
(
nib2
=
nibble
[
*
s
-
'0'
])
==
ILL
)
{
errno
=
EINVAL
;
errno
=
EINVAL
;
return
-
1
;
return
-
1
;
}
}
...
...
lib/libvmod_debug/vmod_debug_obj.c
View file @
5005595f
...
@@ -128,6 +128,7 @@ xyzzy_obj_test_priv_call(VRT_CTX,
...
@@ -128,6 +128,7 @@ xyzzy_obj_test_priv_call(VRT_CTX,
(
void
)
o
;
(
void
)
o
;
xyzzy_test_priv_call
(
ctx
,
priv
);
xyzzy_test_priv_call
(
ctx
,
priv
);
}
}
VCL_VOID
v_matchproto_
()
VCL_VOID
v_matchproto_
()
xyzzy_obj_test_priv_vcl
(
VRT_CTX
,
xyzzy_obj_test_priv_vcl
(
VRT_CTX
,
struct
xyzzy_debug_obj
*
o
,
struct
vmod_priv
*
priv
)
struct
xyzzy_debug_obj
*
o
,
struct
vmod_priv
*
priv
)
...
@@ -135,6 +136,7 @@ xyzzy_obj_test_priv_vcl(VRT_CTX,
...
@@ -135,6 +136,7 @@ xyzzy_obj_test_priv_vcl(VRT_CTX,
(
void
)
o
;
(
void
)
o
;
xyzzy_test_priv_vcl
(
ctx
,
priv
);
xyzzy_test_priv_vcl
(
ctx
,
priv
);
}
}
VCL_STRING
v_matchproto_
()
VCL_STRING
v_matchproto_
()
xyzzy_obj_test_priv_task
(
VRT_CTX
,
xyzzy_obj_test_priv_task
(
VRT_CTX
,
struct
xyzzy_debug_obj
*
o
,
struct
vmod_priv
*
priv
,
VCL_STRING
s
)
struct
xyzzy_debug_obj
*
o
,
struct
vmod_priv
*
priv
,
VCL_STRING
s
)
...
@@ -142,6 +144,7 @@ xyzzy_obj_test_priv_task(VRT_CTX,
...
@@ -142,6 +144,7 @@ xyzzy_obj_test_priv_task(VRT_CTX,
(
void
)
o
;
(
void
)
o
;
return
(
xyzzy_test_priv_task
(
ctx
,
priv
,
s
));
return
(
xyzzy_test_priv_task
(
ctx
,
priv
,
s
));
}
}
VCL_STRING
v_matchproto_
()
VCL_STRING
v_matchproto_
()
xyzzy_obj_test_priv_top
(
VRT_CTX
,
xyzzy_obj_test_priv_top
(
VRT_CTX
,
struct
xyzzy_debug_obj
*
o
,
struct
vmod_priv
*
priv
,
VCL_STRING
s
)
struct
xyzzy_debug_obj
*
o
,
struct
vmod_priv
*
priv
,
VCL_STRING
s
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment