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
35d1e519
Commit
35d1e519
authored
Mar 24, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid sign-extension in hexdump
parent
e8bb7ec5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
vtc.h
bin/varnishtest/vtc.h
+1
-2
vtc_log.c
bin/varnishtest/vtc_log.c
+5
-4
No files found.
bin/varnishtest/vtc.h
View file @
35d1e519
...
...
@@ -107,8 +107,7 @@ void vtc_fatal(struct vtclog *vl, const char *, ...)
__attribute__
((
__noreturn__
))
__v_printflike
(
2
,
3
);
void
vtc_dump
(
struct
vtclog
*
vl
,
int
lvl
,
const
char
*
pfx
,
const
char
*
str
,
int
len
);
void
vtc_hexdump
(
struct
vtclog
*
vl
,
int
lvl
,
const
char
*
pfx
,
const
char
*
str
,
int
len
);
void
vtc_hexdump
(
struct
vtclog
*
,
int
,
const
char
*
,
const
void
*
,
int
);
int
vtc_send_proxy
(
int
fd
,
int
version
,
const
struct
suckaddr
*
sac
,
const
struct
suckaddr
*
sas
);
...
...
bin/varnishtest/vtc_log.c
View file @
35d1e519
...
...
@@ -231,17 +231,18 @@ vtc_dump(struct vtclog *vl, int lvl, const char *pfx, const char *str, int len)
void
vtc_hexdump
(
struct
vtclog
*
vl
,
int
lvl
,
const
char
*
pfx
,
const
char
*
s
tr
,
int
len
)
const
void
*
p
tr
,
int
len
)
{
int
nl
=
1
;
unsigned
l
;
const
uint8_t
*
ss
=
ptr
;
AN
(
pfx
);
GET_VL
(
vl
);
if
(
s
tr
==
NULL
)
if
(
s
s
==
NULL
)
vtc_leadin
(
vl
,
lvl
,
"%s(null)
\n
"
,
pfx
);
else
{
for
(
l
=
0
;
l
<
len
;
l
++
,
s
tr
++
)
{
for
(
l
=
0
;
l
<
len
;
l
++
,
s
s
++
)
{
if
(
l
>
512
)
{
VSB_printf
(
vl
->
vsb
,
"..."
);
break
;
...
...
@@ -250,7 +251,7 @@ vtc_hexdump(struct vtclog *vl, int lvl, const char *pfx,
vtc_leadin
(
vl
,
lvl
,
"%s| "
,
pfx
);
nl
=
0
;
}
VSB_printf
(
vl
->
vsb
,
" %02x"
,
*
s
tr
);
VSB_printf
(
vl
->
vsb
,
" %02x"
,
*
s
s
);
if
((
l
&
0xf
)
==
0xf
)
{
VSB_printf
(
vl
->
vsb
,
"
\n
"
);
nl
=
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