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
81417a43
Commit
81417a43
authored
Oct 01, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swap two variable names, so we don't upset Coverity.
parent
92f175d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
vcc_expr.c
lib/libvcc/vcc_expr.c
+16
-16
No files found.
lib/libvcc/vcc_expr.c
View file @
81417a43
...
...
@@ -535,20 +535,20 @@ vcc_func(struct vcc *tl, struct expr **e, const char *cfunc,
p
=
args
;
if
(
extra
==
NULL
)
extra
=
""
;
e
2
=
vcc_mk_expr
(
vcc_arg_type
(
&
p
),
"%s(ctx%s
\v
+"
,
cfunc
,
extra
);
e
1
=
vcc_mk_expr
(
vcc_arg_type
(
&
p
),
"%s(ctx%s
\v
+"
,
cfunc
,
extra
);
while
(
*
p
!=
'\0'
)
{
e
1
=
NULL
;
e
2
=
NULL
;
fmt
=
vcc_arg_type
(
&
p
);
if
(
fmt
==
VOID
&&
!
strcmp
(
p
,
"PRIV_VCL"
))
{
r
=
strchr
(
name
,
'.'
);
AN
(
r
);
e
1
=
vcc_mk_expr
(
VOID
,
"&vmod_priv_%.*s"
,
e
2
=
vcc_mk_expr
(
VOID
,
"&vmod_priv_%.*s"
,
(
int
)
(
r
-
name
),
name
);
p
+=
strlen
(
p
)
+
1
;
}
else
if
(
fmt
==
VOID
&&
!
strcmp
(
p
,
"PRIV_CALL"
))
{
bprintf
(
buf
,
"vmod_priv_%u"
,
tl
->
nvmodpriv
++
);
Fh
(
tl
,
0
,
"struct vmod_priv %s;
\n
"
,
buf
);
e
1
=
vcc_mk_expr
(
VOID
,
"&%s"
,
buf
);
e
2
=
vcc_mk_expr
(
VOID
,
"&%s"
,
buf
);
p
+=
strlen
(
p
)
+
1
;
}
else
if
(
fmt
==
ENUM
)
{
ExpectErr
(
tl
,
ID
);
...
...
@@ -569,7 +569,7 @@ vcc_func(struct vcc *tl, struct expr **e, const char *cfunc,
vcc_ErrWhere
(
tl
,
tl
->
t
);
return
;
}
e
1
=
vcc_mk_expr
(
VOID
,
"
\"
%.*s
\"
"
,
PF
(
tl
->
t
));
e
2
=
vcc_mk_expr
(
VOID
,
"
\"
%.*s
\"
"
,
PF
(
tl
->
t
));
while
(
*
p
!=
'\0'
)
p
+=
strlen
(
p
)
+
1
;
p
++
;
...
...
@@ -577,31 +577,31 @@ vcc_func(struct vcc *tl, struct expr **e, const char *cfunc,
if
(
*
p
!=
'\0'
)
/*lint !e448 */
SkipToken
(
tl
,
','
);
}
else
{
vcc_expr0
(
tl
,
&
e
1
,
fmt
);
vcc_expr0
(
tl
,
&
e
2
,
fmt
);
ERRCHK
(
tl
);
if
(
e
1
->
fmt
!=
fmt
)
{
if
(
e
2
->
fmt
!=
fmt
)
{
VSB_printf
(
tl
->
sb
,
"Wrong argument type."
);
VSB_printf
(
tl
->
sb
,
" Expected %s."
,
vcc_Type
(
fmt
));
VSB_printf
(
tl
->
sb
,
" Got %s.
\n
"
,
vcc_Type
(
e
1
->
fmt
));
vcc_ErrWhere2
(
tl
,
e
1
->
t1
,
tl
->
t
);
vcc_Type
(
e
2
->
fmt
));
vcc_ErrWhere2
(
tl
,
e
2
->
t1
,
tl
->
t
);
return
;
}
assert
(
e
1
->
fmt
==
fmt
);
if
(
e
1
->
fmt
==
STRING_LIST
)
{
e
1
=
vcc_expr_edit
(
STRING_LIST
,
assert
(
e
2
->
fmt
==
fmt
);
if
(
e
2
->
fmt
==
STRING_LIST
)
{
e
2
=
vcc_expr_edit
(
STRING_LIST
,
"
\v
+
\n\v
1,
\n
vrt_magic_string_end
\v
-"
,
e
1
,
NULL
);
e
2
,
NULL
);
}
if
(
*
p
!=
'\0'
)
SkipToken
(
tl
,
','
);
}
e
2
=
vcc_expr_edit
(
e2
->
fmt
,
"
\v
1,
\n\v
2"
,
e2
,
e1
);
e
1
=
vcc_expr_edit
(
e1
->
fmt
,
"
\v
1,
\n\v
2"
,
e1
,
e2
);
}
SkipToken
(
tl
,
')'
);
e
2
=
vcc_expr_edit
(
e2
->
fmt
,
"
\v
1
\n
)
\v
-"
,
e2
,
NULL
);
*
e
=
e
2
;
e
1
=
vcc_expr_edit
(
e1
->
fmt
,
"
\v
1
\n
)
\v
-"
,
e1
,
NULL
);
*
e
=
e
1
;
}
/*--------------------------------------------------------------------
...
...
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