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
34b630f3
Commit
34b630f3
authored
May 27, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various Flexelinting
parent
bd51f43c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
12 deletions
+16
-12
flint.lnt
bin/varnishhist/flint.lnt
+1
-0
varnishhist.c
bin/varnishhist/varnishhist.c
+10
-9
vsl_dispatch.c
lib/libvarnishapi/vsl_dispatch.c
+2
-3
flint.lnt
lib/libvmod_blob/flint.lnt
+3
-0
No files found.
bin/varnishhist/flint.lnt
View file @
34b630f3
-efile(451, "varnishhist_profiles.h")
-efile(451, "varnishhist_profiles.h")
-efile(451, "varnishhist_options.h")
-efile(451, "varnishhist_options.h")
-sem(usage, r_no)
-sem(usage, r_no)
-sem(profile_error, r_no)
bin/varnishhist/varnishhist.c
View file @
34b630f3
...
@@ -63,7 +63,7 @@ static struct VUT *vut;
...
@@ -63,7 +63,7 @@ static struct VUT *vut;
static
int
hist_low
;
static
int
hist_low
;
static
int
hist_high
;
static
int
hist_high
;
static
int
hist_range
;
static
int
hist_range
;
static
int
hist_buckets
;
static
unsigned
hist_buckets
;
static
pthread_mutex_t
mtx
=
PTHREAD_MUTEX_INITIALIZER
;
static
pthread_mutex_t
mtx
=
PTHREAD_MUTEX_INITIALIZER
;
...
@@ -143,7 +143,7 @@ update(void)
...
@@ -143,7 +143,7 @@ update(void)
unsigned
bm
[
n
],
bh
[
n
];
unsigned
bm
[
n
],
bh
[
n
];
unsigned
max
;
unsigned
max
;
unsigned
i
,
j
,
scale
;
unsigned
i
,
j
,
scale
;
int
k
,
l
;
unsigned
k
,
l
;
erase
();
erase
();
...
@@ -161,10 +161,11 @@ update(void)
...
@@ -161,10 +161,11 @@ update(void)
mvprintw
(
0
,
0
,
"%*s"
,
COLS
-
1
,
ident
);
mvprintw
(
0
,
0
,
"%*s"
,
COLS
-
1
,
ident
);
/* count our flock */
/* count our flock */
for
(
i
=
0
;
i
<
n
;
++
i
)
memset
(
bm
,
0
,
sizeof
bm
);
bm
[
i
]
=
bh
[
i
]
=
0
;
memset
(
bh
,
0
,
sizeof
bh
)
;
for
(
k
=
0
,
max
=
1
;
k
<
hist_buckets
;
++
k
)
{
for
(
k
=
0
,
max
=
1
;
k
<
hist_buckets
;
++
k
)
{
l
=
k
*
n
/
hist_buckets
;
l
=
k
*
n
/
hist_buckets
;
assert
(
l
<
n
);
bm
[
l
]
+=
bucket_miss
[
k
];
bm
[
l
]
+=
bucket_miss
[
k
];
bh
[
l
]
+=
bucket_hit
[
k
];
bh
[
l
]
+=
bucket_hit
[
k
];
if
(
bm
[
l
]
+
bh
[
l
]
>
max
)
if
(
bm
[
l
]
+
bh
[
l
]
>
max
)
...
@@ -413,13 +414,13 @@ do_curses(void *arg)
...
@@ -413,13 +414,13 @@ do_curses(void *arg)
break
;
break
;
case
'\032'
:
/* Ctrl-Z */
case
'\032'
:
/* Ctrl-Z */
endwin
();
endwin
();
raise
(
SIGTSTP
);
AZ
(
raise
(
SIGTSTP
)
);
break
;
break
;
case
'\003'
:
/* Ctrl-C */
case
'\003'
:
/* Ctrl-C */
case
'\021'
:
/* Ctrl-Q */
case
'\021'
:
/* Ctrl-Q */
case
'Q'
:
case
'Q'
:
case
'q'
:
case
'q'
:
raise
(
SIGINT
);
AZ
(
raise
(
SIGINT
)
);
endwin
();
endwin
();
return
(
NULL
);
return
(
NULL
);
case
'0'
:
case
'0'
:
...
@@ -432,7 +433,7 @@ do_curses(void *arg)
...
@@ -432,7 +433,7 @@ do_curses(void *arg)
case
'7'
:
case
'7'
:
case
'8'
:
case
'8'
:
case
'9'
:
case
'9'
:
delay
=
1
<<
(
ch
-
'0'
);
delay
=
1
U
<<
(
ch
-
'0'
);
break
;
break
;
case
'+'
:
case
'+'
:
delay
/=
2
;
delay
/=
2
;
...
@@ -483,7 +484,7 @@ usage(int status)
...
@@ -483,7 +484,7 @@ usage(int status)
exit
(
status
);
exit
(
status
);
}
}
static
void
static
void
v_noreturn_
profile_error
(
const
char
*
s
)
profile_error
(
const
char
*
s
)
{
{
fprintf
(
stderr
,
"-P: '%s' is not a valid"
fprintf
(
stderr
,
"-P: '%s' is not a valid"
...
@@ -506,7 +507,7 @@ main(int argc, char **argv)
...
@@ -506,7 +507,7 @@ main(int argc, char **argv)
char
*
colon
;
char
*
colon
;
const
char
*
ptag
,
*
profile
=
"responsetime"
;
const
char
*
ptag
,
*
profile
=
"responsetime"
;
pthread_t
thr
;
pthread_t
thr
;
int
fnum
=
-
1
;
int
fnum
;
struct
profile
cli_p
=
{
0
};
struct
profile
cli_p
=
{
0
};
vut
=
VUT_InitProg
(
argc
,
argv
,
&
vopt_spec
);
vut
=
VUT_InitProg
(
argc
,
argv
,
&
vopt_spec
);
...
...
lib/libvarnishapi/vsl_dispatch.c
View file @
34b630f3
...
@@ -582,7 +582,6 @@ vtx_retire(struct VSLQ *vslq, struct vtx **pvtx)
...
@@ -582,7 +582,6 @@ vtx_retire(struct VSLQ *vslq, struct vtx **pvtx)
vslq
->
n_cache
++
;
vslq
->
n_cache
++
;
}
else
{
}
else
{
FREE_OBJ
(
vtx
);
FREE_OBJ
(
vtx
);
vtx
=
NULL
;
}
}
}
}
...
@@ -693,7 +692,7 @@ vtx_parse_link(const char *str, enum VSL_transaction_e *ptype,
...
@@ -693,7 +692,7 @@ vtx_parse_link(const char *str, enum VSL_transaction_e *ptype,
return
(
0
);
return
(
0
);
/* transaction type */
/* transaction type */
for
(
et
=
0
;
et
<
VSL_t__MAX
;
et
++
)
for
(
et
=
VSL_t_unknown
;
et
<
VSL_t__MAX
;
et
++
)
if
(
!
strcmp
(
type
,
vsl_t_names
[
et
]))
if
(
!
strcmp
(
type
,
vsl_t_names
[
et
]))
break
;
break
;
if
(
et
>=
VSL_t__MAX
)
if
(
et
>=
VSL_t__MAX
)
...
@@ -709,7 +708,7 @@ vtx_parse_link(const char *str, enum VSL_transaction_e *ptype,
...
@@ -709,7 +708,7 @@ vtx_parse_link(const char *str, enum VSL_transaction_e *ptype,
return
(
2
);
return
(
2
);
/* transaction reason */
/* transaction reason */
for
(
er
=
0
;
er
<
VSL_r__MAX
;
er
++
)
for
(
er
=
VSL_r_unknown
;
er
<
VSL_r__MAX
;
er
++
)
if
(
!
strcmp
(
reason
,
vsl_r_names
[
er
]))
if
(
!
strcmp
(
reason
,
vsl_r_names
[
er
]))
break
;
break
;
if
(
er
>=
VSL_r__MAX
)
if
(
er
>=
VSL_r__MAX
)
...
...
lib/libvmod_blob/flint.lnt
View file @
34b630f3
-efile(451, "tbl_*.h") // No include guard
-efile(451, "tbl_*.h") // No include guard
-e784 // Nul character truncated from string
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