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
c5d0a955
Commit
c5d0a955
authored
Aug 06, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FlexeLinting: 'oper' is an incredibly bad global name.
parent
957dee5c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
cache_ban.c
bin/varnishd/cache/cache_ban.c
+1
-3
cache_ban.h
bin/varnishd/cache/cache_ban.h
+1
-0
cache_ban_build.c
bin/varnishd/cache/cache_ban_build.c
+5
-5
No files found.
bin/varnishd/cache/cache_ban.c
View file @
c5d0a955
...
...
@@ -70,8 +70,6 @@ static const char * const arg_name[BAN_ARGARRSZ + 1] = {
[
BAN_ARGARRSZ
]
=
NULL
};
extern
const
char
*
const
oper
[
BAN_OPERARRSZ
+
1
];
/*--------------------------------------------------------------------
* Storage handling of bans
*/
...
...
@@ -806,7 +804,7 @@ ban_render(struct cli *cli, const uint8_t *bs, int quote)
else
VCLI_Out
(
cli
,
"%s"
,
arg_name
[
BAN_ARGIDX
(
bt
.
arg1
)]);
VCLI_Out
(
cli
,
" %s "
,
oper
[
BAN_OPERIDX
(
bt
.
oper
)]);
VCLI_Out
(
cli
,
" %s "
,
ban_
oper
[
BAN_OPERIDX
(
bt
.
oper
)]);
if
(
BANS_HAS_ARG2_DOUBLE
(
bt
.
arg1
))
{
vdur_render
(
buf
,
bt
.
arg2_double
);
...
...
bin/varnishd/cache/cache_ban.h
View file @
c5d0a955
...
...
@@ -145,6 +145,7 @@ extern struct ban * volatile ban_start;
extern
pthread_cond_t
ban_lurker_cond
;
extern
uint64_t
bans_persisted_bytes
;
extern
uint64_t
bans_persisted_fragmentation
;
extern
const
char
*
const
ban_oper
[
BAN_OPERARRSZ
+
1
];
void
ban_mark_completed
(
struct
ban
*
);
unsigned
ban_len
(
const
uint8_t
*
banspec
);
...
...
bin/varnishd/cache/cache_ban_build.c
View file @
c5d0a955
...
...
@@ -76,7 +76,7 @@ static const unsigned arg_opervalid[BAN_ARGARRSZ + 1] = {
static
const
char
*
arg_operhelp
[
BAN_ARGARRSZ
+
1
];
// operators
const
char
*
const
oper
[
BAN_OPERARRSZ
+
1
]
=
{
const
char
*
const
ban_
oper
[
BAN_OPERARRSZ
+
1
]
=
{
#define OPER(op, str) [BAN_OPERIDX(op)] = (str),
#include "tbl/ban_oper.h"
[
BAN_OPERARRSZ
]
=
NULL
...
...
@@ -205,7 +205,7 @@ ban_parse_oper(const char *p)
int
i
;
for
(
i
=
0
;
i
<
BAN_OPERARRSZ
;
i
++
)
{
if
(
!
strcmp
(
p
,
oper
[
i
]))
if
(
!
strcmp
(
p
,
ban_
oper
[
i
]))
return
(
_BANS_OPER_OFF
+
i
);
}
return
(
-
1
);
...
...
@@ -396,14 +396,14 @@ ban_build_arg_operhelp(struct vsb *vsb, int arg)
if
((
mask
&
(
1U
<<
i
))
==
0
)
continue
;
if
(
p
==
NULL
)
p
=
oper
[
i
];
p
=
ban_
oper
[
i
];
else
if
(
n
==
NULL
)
n
=
oper
[
i
];
n
=
ban_
oper
[
i
];
else
{
VSB_cat
(
vsb
,
p
);
VSB_cat
(
vsb
,
", "
);
p
=
n
;
n
=
oper
[
i
];
n
=
ban_
oper
[
i
];
}
}
...
...
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