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
fda02024
Commit
fda02024
authored
Oct 28, 2020
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cocci: Remove redundant AN() checks after REPLACE()
Except those present in varnishtest/vtest.
parent
1b0a51cc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
common_vsmw.c
bin/varnishd/common/common_vsmw.c
+0
-1
mgt_symtab.c
bin/varnishd/mgt/mgt_symtab.c
+0
-1
varnishncsa.c
bin/varnishncsa/varnishncsa.c
+0
-1
replace.cocci
tools/coccinelle/replace.cocci
+7
-0
No files found.
bin/varnishd/common/common_vsmw.c
View file @
fda02024
...
...
@@ -246,7 +246,6 @@ vsmw_delseg(struct vsmw *vsmw, struct vsmwseg *seg)
}
else
{
vsmw_mkent
(
vsmw
,
vsmw
->
idx
);
REPLACE
(
t
,
VSB_data
(
vsmw
->
vsb
));
AN
(
t
);
fd
=
openat
(
vsmw
->
vdirfd
,
t
,
O_WRONLY
|
O_CREAT
|
O_EXCL
,
vsmw
->
mode
);
assert
(
fd
>=
0
);
...
...
bin/varnishd/mgt/mgt_symtab.c
View file @
fda02024
...
...
@@ -137,7 +137,6 @@ mgt_vcl_import_vmod(struct vclprog *vp, const struct vjsn_val *vv)
ALLOC_OBJ
(
vf
,
VMODFILE_MAGIC
);
AN
(
vf
);
REPLACE
(
vf
->
fname
,
v_dst
);
AN
(
vf
->
fname
);
VTAILQ_INIT
(
&
vf
->
vcls
);
AZ
(
mgt_vcl_cache_vmod
(
v_name
,
v_file
,
v_dst
));
VTAILQ_INSERT_TAIL
(
&
vmodhead
,
vf
,
list
);
...
...
bin/varnishncsa/varnishncsa.c
View file @
fda02024
...
...
@@ -1122,7 +1122,6 @@ main(int argc, char * const *argv)
if
(
format
!=
NULL
)
VUT_Error
(
vut
,
1
,
"Format already set"
);
REPLACE
(
format
,
optarg
);
AN
(
format
);
break
;
case
'f'
:
if
(
format
!=
NULL
)
...
...
tools/coccinelle/replace.cocci
View file @
fda02024
...
...
@@ -10,3 +10,10 @@ expression ptr, val;
- ptr = strdup(val);
- AN(ptr);
+ REPLACE(ptr, val);
@@
expression ptr, val;
@@
REPLACE(ptr, val);
- AN(ptr);
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