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
2cbaf866
Commit
2cbaf866
authored
May 16, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow for functions which takes no arguments.
Spotted by: Martin
parent
7a3c8e2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
vcc_expr.c
lib/libvcl/vcc_expr.c
+3
-5
No files found.
lib/libvcl/vcc_expr.c
View file @
2cbaf866
...
...
@@ -518,7 +518,7 @@ vcc_Eval_Var(struct vcc *tl, struct expr **e, const struct symbol *sym)
void
vcc_Eval_Func
(
struct
vcc
*
tl
,
struct
expr
**
e
,
const
struct
symbol
*
sym
)
{
const
char
*
p
,
*
q
,
*
r
;
const
char
*
p
,
*
r
;
struct
expr
*
e1
,
*
e2
;
enum
var_type
fmt
;
char
buf
[
32
];
...
...
@@ -529,8 +529,7 @@ vcc_Eval_Func(struct vcc *tl, struct expr **e, const struct symbol *sym)
SkipToken
(
tl
,
ID
);
SkipToken
(
tl
,
'('
);
p
=
sym
->
args
;
e2
=
vcc_mk_expr
(
vcc_arg_type
(
&
p
),
"%s(sp,
\v
+"
,
sym
->
cfunc
);
q
=
"
\v
1
\n\v
2"
;
e2
=
vcc_mk_expr
(
vcc_arg_type
(
&
p
),
"%s(sp
\v
+"
,
sym
->
cfunc
);
while
(
*
p
!=
'\0'
)
{
e1
=
NULL
;
fmt
=
vcc_arg_type
(
&
p
);
...
...
@@ -619,8 +618,7 @@ vcc_Eval_Func(struct vcc *tl, struct expr **e, const struct symbol *sym)
if
(
*
p
!=
'\0'
)
SkipToken
(
tl
,
','
);
}
e2
=
vcc_expr_edit
(
e2
->
fmt
,
q
,
e2
,
e1
);
q
=
"
\v
1,
\n\v
2"
;
e2
=
vcc_expr_edit
(
e2
->
fmt
,
"
\v
1,
\n\v
2"
,
e2
,
e1
);
}
SkipToken
(
tl
,
')'
);
e2
=
vcc_expr_edit
(
e2
->
fmt
,
"
\v
1
\n
)
\v
-"
,
e2
,
NULL
);
...
...
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