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
198caa60
Unverified
Commit
198caa60
authored
Mar 11, 2020
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flexelinting
fix signed/unsigned comparisons
parent
65f048ce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
16 deletions
+17
-16
varnishhist.c
bin/varnishhist/varnishhist.c
+13
-12
varnishncsa.c
bin/varnishncsa/varnishncsa.c
+2
-2
varnishtop.c
bin/varnishtop/varnishtop.c
+2
-2
No files found.
bin/varnishhist/varnishhist.c
View file @
198caa60
...
...
@@ -142,17 +142,18 @@ update(void)
const
unsigned
n
=
w
*
hist_range
;
unsigned
bm
[
n
],
bh
[
n
];
unsigned
max
;
unsigned
i
,
j
,
scale
;
unsigned
scale
;
int
i
,
j
;
unsigned
k
,
l
;
erase
();
/* Draw horizontal axis */
for
(
i
=
0
;
i
<
n
;
++
i
)
(
void
)
mvaddch
(
LINES
-
2
,
i
,
'-'
);
for
(
k
=
0
,
l
=
hist_low
;
k
<
hist_range
;
++
k
,
++
l
)
{
(
void
)
mvaddch
(
LINES
-
2
,
w
*
k
,
'+'
);
mvprintw
(
LINES
-
1
,
w
*
k
,
"|1e%d"
,
l
);
for
(
k
=
0
;
k
<
n
;
++
k
)
(
void
)
mvaddch
(
LINES
-
2
,
k
,
'-'
);
for
(
i
=
0
,
j
=
hist_low
;
i
<
hist_range
;
++
i
,
++
j
)
{
(
void
)
mvaddch
(
LINES
-
2
,
w
*
i
,
'+'
);
mvprintw
(
LINES
-
1
,
w
*
i
,
"|1e%d"
,
j
);
}
if
(
end_of_file
)
...
...
@@ -191,11 +192,11 @@ update(void)
mvprintw
((
LINES
-
2
)
-
j
,
0
,
"%u_"
,
j
*
scale
);
/* show them */
for
(
i
=
0
;
i
<
n
;
++
i
)
{
for
(
j
=
0
;
j
<
bm
[
i
]
/
scale
;
++
j
)
(
void
)
mvaddch
((
LINES
-
3
)
-
j
,
i
,
'#'
);
for
(;
j
<
(
bm
[
i
]
+
bh
[
i
])
/
scale
;
++
j
)
(
void
)
mvaddch
((
LINES
-
3
)
-
j
,
i
,
'|'
);
for
(
k
=
0
;
k
<
n
;
++
k
)
{
for
(
l
=
0
;
l
<
bm
[
k
]
/
scale
;
++
l
)
(
void
)
mvaddch
((
LINES
-
3
)
-
l
,
k
,
'#'
);
for
(;
l
<
(
bm
[
k
]
+
bh
[
k
])
/
scale
;
++
l
)
(
void
)
mvaddch
((
LINES
-
3
)
-
l
,
k
,
'|'
);
}
refresh
();
...
...
@@ -306,7 +307,7 @@ accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
i
=
hist_high
*
HIST_RES
-
1
;
i
-=
hist_low
*
HIST_RES
;
assert
(
i
>=
0
);
assert
(
i
<
hist_buckets
);
assert
(
(
unsigned
)
i
<
hist_buckets
);
AZ
(
pthread_mutex_lock
(
&
mtx
));
...
...
bin/varnishncsa/varnishncsa.c
View file @
198caa60
...
...
@@ -710,7 +710,7 @@ parse_format(const char *format)
if
(
!*
q
)
VUT_Error
(
vut
,
1
,
"Unmatched bracket at: %s"
,
p
-
2
);
assert
(
q
-
p
<
sizeof
buf
-
1
);
assert
(
(
unsigned
)(
q
-
p
)
<
sizeof
buf
-
1
);
strncpy
(
buf
,
p
,
q
-
p
);
buf
[
q
-
p
]
=
'\0'
;
q
++
;
...
...
@@ -755,7 +755,7 @@ isprefix(const char *prefix, size_t len, const char *b,
const
char
*
e
,
const
char
**
next
)
{
assert
(
len
>
0
);
if
(
e
-
b
<
len
||
strncasecmp
(
b
,
prefix
,
len
))
if
(
e
<
b
+
len
||
strncasecmp
(
b
,
prefix
,
len
))
return
(
0
);
b
+=
len
;
if
(
next
)
{
...
...
bin/varnishtop/varnishtop.c
View file @
198caa60
...
...
@@ -77,7 +77,7 @@ struct top {
double
count
;
};
static
int
period
=
60
;
/* seconds */
static
unsigned
period
=
60
;
/* seconds */
static
int
end_of_file
=
0
;
static
unsigned
ntop
;
static
pthread_mutex_t
mtx
=
PTHREAD_MUTEX_INITIALIZER
;
...
...
@@ -184,7 +184,7 @@ accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
}
static
void
update
(
int
p
)
update
(
unsigned
p
)
{
struct
top
*
tp
,
*
tp2
;
int
l
,
len
;
...
...
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