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
fe97d31c
Unverified
Commit
fe97d31c
authored
Jul 26, 2022
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Partially reapply return.cocci
parent
69ca9b7b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
19 deletions
+18
-19
cache_http.c
bin/varnishd/cache/cache_http.c
+6
-6
cache_vrt_filter.c
bin/varnishd/cache/cache_vrt_filter.c
+1
-1
cache_http1_vfp.c
bin/varnishd/http1/cache_http1_vfp.c
+1
-2
vnum.c
lib/libvarnish/vnum.c
+4
-4
vcc_source.c
lib/libvcc/vcc_source.c
+2
-2
vcc_token.c
lib/libvcc/vcc_token.c
+1
-1
vcc_vmod.c
lib/libvcc/vcc_vmod.c
+1
-1
vmod_debug_acl.c
vmod/vmod_debug_acl.c
+2
-2
No files found.
bin/varnishd/cache/cache_http.c
View file @
fe97d31c
...
...
@@ -141,22 +141,22 @@ http_hdr_flags(const char *b, const char *e)
struct
http_hdrflg
*
retval
;
if
(
e
==
NULL
)
return
(
NULL
);
return
(
NULL
);
assert
(
e
>
b
);
u
=
(
unsigned
)(
e
-
b
);
assert
(
b
+
u
==
e
);
if
(
u
<
2
||
u
>
19
)
// MIN_WORD_LENGTH & MAX_WORD_LENGTH
return
(
NULL
);
return
(
NULL
);
if
(
u
>
3
)
u
+=
http_asso_values
[((
const
uint8_t
*
)
b
)[
3
]];
if
(
u
>
38
)
// MAX_HASH_VALUE
return
(
NULL
);
return
(
NULL
);
retval
=
&
http_hdrflg
[
u
];
if
(
retval
->
hdr
==
NULL
)
return
(
NULL
);
return
(
NULL
);
if
(
!
http_hdr_at
(
retval
->
hdr
+
1
,
b
,
e
-
b
))
return
(
NULL
);
return
(
retval
);
return
(
NULL
);
return
(
retval
);
}
/*--------------------------------------------------------------------*/
...
...
bin/varnishd/cache/cache_vrt_filter.c
View file @
fe97d31c
...
...
@@ -124,7 +124,7 @@ vrt_addfilter(VRT_CTX, const struct vfp *vfp, const struct vdp *vdp)
vp
->
name
=
name
;
vp
->
nlen
=
strlen
(
name
);
VTAILQ_INSERT_TAIL
(
hd
,
vp
,
list
);
return
(
err
);
return
(
err
);
}
const
char
*
...
...
bin/varnishd/http1/cache_http1_vfp.c
View file @
fe97d31c
...
...
@@ -130,8 +130,7 @@ v1f_chunked_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *ptr,
do
{
lr
=
v1f_read
(
vc
,
htc
,
buf
+
u
,
1
);
if
(
lr
<=
0
)
return
(
VFP_Error
(
vc
,
"chunked read err"
));
return
(
VFP_Error
(
vc
,
"chunked read err"
));
}
while
(
u
==
1
&&
buf
[
0
]
==
'0'
&&
buf
[
u
]
==
'0'
);
if
(
!
vct_ishex
(
buf
[
u
]))
break
;
...
...
lib/libvarnish/vnum.c
View file @
fe97d31c
...
...
@@ -119,7 +119,7 @@ SF_Parse_Integer(const char **ipp, const char **errtxt)
int
sign
;
retval
=
sf_parse_int
(
ipp
,
errtxt
,
&
sign
,
15
);
return
(
retval
*
sign
);
return
(
retval
*
sign
);
}
/**********************************************************************
...
...
@@ -182,7 +182,7 @@ SF_Parse_Decimal(const char **ipp, int strict, const char **errtxt)
retval
=
SF_Parse_Number
(
ipp
,
strict
,
errtxt
);
if
(
errno
)
return
(
retval
);
return
(
retval
);
if
(
retval
<
VRT_DECIMAL_MIN
||
retval
>
VRT_DECIMAL_MAX
)
BAIL
(
err_fatnum
);
return
(
retval
);
...
...
@@ -345,9 +345,9 @@ VNUM_2bytes(const char *p, uintmax_t *r, uintmax_t rel)
fval
=
SF_Parse_Number
(
&
p
,
1
,
&
errtxt
);
if
(
errno
)
return
(
errtxt
);
return
(
errtxt
);
if
(
fval
<
0
)
return
(
err_invalid_num
);
return
(
err_invalid_num
);
fval
=
VNUM_bytes_unit
(
fval
,
p
,
NULL
,
rel
,
&
errtxt
);
if
(
errno
)
...
...
lib/libvcc/vcc_source.c
View file @
fe97d31c
...
...
@@ -161,7 +161,7 @@ vcc_lex_include(struct vcc *tl, const struct source *src_sp, struct token *t)
}
else
{
VSB_cat
(
tl
->
sb
,
"Unknown include flag:
\n
"
);
vcc_ErrWhere
(
tl
,
t
);
return
(
t
);
return
(
t
);
}
tok1
=
VTAILQ_NEXT
(
t
,
src_list
);
AN
(
tok1
);
...
...
@@ -196,7 +196,7 @@ vcc_lex_include(struct vcc *tl, const struct source *src_sp, struct token *t)
"include
\"
./xxxxx
\"
; needs absolute "
"filename of including file.
\n
"
);
vcc_ErrWhere
(
tl
,
tok1
);
return
(
t
);
return
(
t
);
}
vsb
=
VSB_new_auto
();
AN
(
vsb
);
...
...
lib/libvcc/vcc_token.c
View file @
fe97d31c
...
...
@@ -502,7 +502,7 @@ vcc_lex_number(struct vcc *tl, struct source *sp, const char *p)
if
(
q
-
p
>
13
||
r
-
q
>
3
)
{
VSB_cat
(
tl
->
sb
,
"Too many digits for real.
\n
"
);
vcc_ErrWhere
(
tl
,
tl
->
t
);
return
(
NULL
);
return
(
NULL
);
}
tl
->
t
->
num
=
strtod
(
p
,
&
s
);
assert
(
s
==
tl
->
t
->
e
);
...
...
lib/libvcc/vcc_vmod.c
View file @
fe97d31c
...
...
@@ -260,7 +260,7 @@ vcc_VmodLoad(const struct vcc *tl, struct vmod_import *vim)
if
(
err
!=
NULL
)
return
(
-
1
);
return
(
0
);
return
(
0
);
}
static
void
v_matchproto_
(
vcc_do_stanza_f
)
...
...
vmod/vmod_debug_acl.c
View file @
fe97d31c
...
...
@@ -183,7 +183,7 @@ xyzzy_sweep_acl(VRT_CTX, VCL_ACL acl, VCL_IP ip0, VCL_IP ip1, VCL_INT step)
AN
(
ip1
);
assert
(
step
>
0
);
if
(
setup_sweep
(
ctx
,
asw
,
ip0
,
ip1
,
step
))
return
(
NULL
);
return
(
NULL
);
vsb
=
VSB_new_auto
();
AN
(
vsb
);
...
...
@@ -247,7 +247,7 @@ xyzzy_time_acl(VRT_CTX, VCL_ACL acl, VCL_IP ip0, VCL_IP ip1,
assert
(
turnus
>
0
);
if
(
setup_sweep
(
ctx
,
asw
,
ip0
,
ip1
,
step
))
return
(
-
1
);
return
(
-
1
);
do
{
(
void
)
VRT_acl_match
(
ctx
,
acl
,
asw
->
probe
);
}
while
(
step_sweep
(
asw
)
<=
0
);
...
...
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