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
67da10c7
Commit
67da10c7
authored
Dec 13, 2019
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coccinelle patch for SkipToken in libvcc
parent
2b04d293
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
11 deletions
+16
-11
vcc_action.c
lib/libvcc/vcc_action.c
+4
-8
vcc_vmod.c
lib/libvcc/vcc_vmod.c
+1
-3
vcc_skip_token.cocci
tools/coccinelle/vcc_skip_token.cocci
+11
-0
No files found.
lib/libvcc/vcc_action.c
View file @
67da10c7
...
...
@@ -225,8 +225,7 @@ static void
vcc_act_return_pass
(
struct
vcc
*
tl
)
{
ExpectErr
(
tl
,
'('
);
vcc_NextToken
(
tl
);
SkipToken
(
tl
,
'('
);
Fb
(
tl
,
1
,
"VRT_hit_for_pass(ctx,
\n
"
);
tl
->
indent
+=
INDENT
;
vcc_Expr
(
tl
,
DURATION
);
...
...
@@ -240,8 +239,7 @@ vcc_act_return_pass(struct vcc *tl)
static
void
vcc_act_return_fail
(
struct
vcc
*
tl
)
{
ExpectErr
(
tl
,
'('
);
vcc_NextToken
(
tl
);
SkipToken
(
tl
,
'('
);
Fb
(
tl
,
1
,
"VRT_fail(ctx,
\n
"
);
tl
->
indent
+=
INDENT
;
vcc_Expr
(
tl
,
STRING
);
...
...
@@ -257,8 +255,7 @@ static void
vcc_act_return_synth
(
struct
vcc
*
tl
)
{
ExpectErr
(
tl
,
'('
);
vcc_NextToken
(
tl
);
SkipToken
(
tl
,
'('
);
Fb
(
tl
,
1
,
"VRT_synth(ctx,
\n
"
);
tl
->
indent
+=
INDENT
;
vcc_Expr
(
tl
,
INT
);
...
...
@@ -285,8 +282,7 @@ vcc_act_return_vcl(struct vcc *tl)
struct
inifin
*
p
;
char
buf
[
1024
];
ExpectErr
(
tl
,
'('
);
vcc_NextToken
(
tl
);
SkipToken
(
tl
,
'('
);
ExpectErr
(
tl
,
ID
);
sym
=
VCC_SymbolGet
(
tl
,
SYM_VCL
,
SYMTAB_EXISTING
,
XREF_NONE
);
ERRCHK
(
tl
);
...
...
lib/libvcc/vcc_vmod.c
View file @
67da10c7
...
...
@@ -396,9 +396,7 @@ vcc_Act_New(struct vcc *tl, struct token *t, struct symbol *sym)
AN
(
isym
);
isym
->
noref
=
1
;
ExpectErr
(
tl
,
'='
);
vcc_NextToken
(
tl
);
SkipToken
(
tl
,
'='
);
ExpectErr
(
tl
,
ID
);
osym
=
VCC_SymbolGet
(
tl
,
SYM_OBJECT
,
SYMTAB_EXISTING
,
XREF_NONE
);
ERRCHK
(
tl
);
...
...
tools/coccinelle/vcc_skip_token.cocci
0 → 100644
View file @
67da10c7
/*
* This patch simplifies token parsing.
*/
@@
expression tl, tok;
@@
- ExpectErr(tl, tok);
- vcc_NextToken(tl);
+ SkipToken(tl, tok);
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