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
26fcf629
Commit
26fcf629
authored
Sep 05, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor flexelint nit-picking, while trying to make sure there was nothing
major lurking.
parent
3a4532bf
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
26 deletions
+25
-26
flint.lnt
bin/varnishtest/flint.lnt
+2
-0
vtc.h
bin/varnishtest/vtc.h
+0
-1
vtc_client.c
bin/varnishtest/vtc_client.c
+1
-1
vtc_h2_tbl.c
bin/varnishtest/vtc_h2_tbl.c
+1
-1
vtc_http.c
bin/varnishtest/vtc_http.c
+6
-6
vtc_http2.c
bin/varnishtest/vtc_http2.c
+15
-17
No files found.
bin/varnishtest/flint.lnt
View file @
26fcf629
...
...
@@ -5,6 +5,8 @@
-esym(850, av)
-esym(528, iter_call) // Flexelint bug
-esym(534, snprintf) // Only for varnishtest, and not really nice
-e712 // 14 Info 712 Loss of precision (___) (___ to ___)
-e747 // 16 Info 747 Significant prototype coercion (___) ___ to ___
...
...
bin/varnishtest/vtc.h
View file @
26fcf629
...
...
@@ -113,7 +113,6 @@ void extmacro_def(const char *name, const char *fmt, ...)
__v_printflike
(
2
,
3
);
struct
http
;
extern
const
struct
cmds
http_cmds
[];
void
cmd_stream
(
CMD_ARGS
);
void
start_h2
(
struct
http
*
hp
);
void
stop_h2
(
struct
http
*
hp
);
...
...
bin/varnishtest/vtc_client.c
View file @
26fcf629
...
...
@@ -78,7 +78,7 @@ proxy_cb(void *priv, const struct suckaddr *sa)
}
static
void
client_proxy
(
struct
vtclog
*
vl
,
int
fd
,
int
version
,
char
*
spec
)
client_proxy
(
struct
vtclog
*
vl
,
int
fd
,
int
version
,
c
onst
c
har
*
spec
)
{
struct
suckaddr
*
sac
,
*
sas
;
const
char
*
err
;
...
...
bin/varnishtest/vtc_h2_tbl.c
View file @
26fcf629
...
...
@@ -44,7 +44,7 @@
#undef STAT_HDRS
/*lint -save -e778 */
struct
hpk_hdr
sttbl
[]
=
{
const
struct
hpk_hdr
sttbl
[]
=
{
{{
NULL
,
0
,
0
},
{
NULL
,
0
,
0
},
hpk_idx
,
0
},
#define STAT_HDRS(j, k, v) \
{ \
...
...
bin/varnishtest/vtc_http.c
View file @
26fcf629
...
...
@@ -49,6 +49,8 @@
#include "vtcp.h"
#include "hpack.h"
static
const
struct
cmds
http_cmds
[];
/* SECTION: client-server client/server
*
* Client and server threads are fake HTTP entities used to test your Varnish
...
...
@@ -738,11 +740,8 @@ cmd_http_rxresphdrs(CMD_ARGS)
* Ungzip rx'ed body
*/
#define TRUST_ME(ptr) ((void*)(uintptr_t)(ptr))
#define OVERHEAD 64L
static
void
cmd_http_gunzip_body
(
CMD_ARGS
)
{
...
...
@@ -1679,7 +1678,7 @@ cmd_http_fatal(CMD_ARGS)
* Same as for the top-level barrier
*/
char
PREFACE
[]
=
"PRI * HTTP/2.0
\r\n\r\n
SM
\r\n\r\n
"
;
c
onst
c
har
PREFACE
[]
=
"PRI * HTTP/2.0
\r\n\r\n
SM
\r\n\r\n
"
;
/* SECTION: client-server.spec.txpri txpri (client)
*
...
...
@@ -1785,7 +1784,7 @@ cmd_http_stream(CMD_ARGS)
* Execute HTTP specifications
*/
const
struct
cmds
http_cmds
[]
=
{
static
const
struct
cmds
http_cmds
[]
=
{
{
"timeout"
,
cmd_http_timeout
},
{
"txreq"
,
cmd_http_txreq
},
...
...
@@ -1856,7 +1855,8 @@ http_process(struct vtclog *vl, const char *spec, int sock, int *sfd)
hp
->
gziplevel
=
0
;
hp
->
gzipresidual
=
-
1
;
VTCP_hisname
(
sock
,
hp
->
rem_ip
,
VTCP_ADDRBUFSIZE
,
hp
->
rem_port
,
VTCP_PORTBUFSIZE
);
VTCP_hisname
(
sock
,
hp
->
rem_ip
,
VTCP_ADDRBUFSIZE
,
hp
->
rem_port
,
VTCP_PORTBUFSIZE
);
parse_string
(
spec
,
http_cmds
,
hp
,
vl
);
if
(
hp
->
h2
)
stop_h2
(
hp
);
...
...
bin/varnishtest/vtc_http2.c
View file @
26fcf629
...
...
@@ -52,7 +52,6 @@
#include "hpack.h"
#include "vend.h"
#define MAX_HDR 50
#define ERR_MAX 13
#define BUF_SIZE (1024*2048)
...
...
@@ -102,7 +101,6 @@ struct stream {
pthread_cond_t
cond
;
struct
frame
*
frame
;
pthread_t
tp
;
unsigned
reading
;
struct
http
*
hp
;
int64_t
ws
;
...
...
@@ -509,7 +507,7 @@ parse_hdr(struct stream *s, struct frame *f, struct vsb *vsb)
if
(
f
->
type
==
TYPE_HEADERS
&&
f
->
flags
&
PRIORITY
){
shift
+=
5
;
n
=
vbe32dec
(
f
->
data
);
s
->
dependency
=
n
&
~
(
1
<<
31
);
s
->
dependency
=
n
&
~
(
1
U
<<
31
);
exclusive
=
n
>>
31
;
s
->
weight
=
f
->
data
[
4
];
...
...
@@ -521,7 +519,7 @@ parse_hdr(struct stream *s, struct frame *f, struct vsb *vsb)
}
else
if
(
f
->
type
==
TYPE_PUSH_PROMISE
){
shift
+=
4
;
n
=
vbe32dec
(
f
->
data
);
f
->
md
.
promised
=
n
&
~
(
1
<<
31
);
f
->
md
.
promised
=
n
&
~
(
1
U
<<
31
);
}
AZ
(
VSB_bcat
(
vsb
,
data
+
shift
,
size
-
shift
));
...
...
@@ -545,7 +543,7 @@ parse_prio(struct stream *s, struct frame *f)
AN
(
buf
);
n
=
vbe32dec
(
f
->
data
);
f
->
md
.
prio
.
stream
=
n
&
~
(
1
<<
31
);
f
->
md
.
prio
.
stream
=
n
&
~
(
1
U
<<
31
);
s
->
dependency
=
f
->
md
.
prio
.
stream
;
if
(
n
>>
31
){
...
...
@@ -843,9 +841,9 @@ do { \
sp++; \
AN(*sp); \
STRTOU32(n, *sp, p, v, c); \
if (l && n >= (1
<< l))
\
vtc_log(v, 0,
c " must be a %d-bits integer (found %s)",
\
l, *sp);
\
if (l && n >= (1
U << l))
\
vtc_log(v, 0,
\
c " must be a %d-bits integer (found %s)", l, *sp);
\
} while (0)
#define CHECK_LAST_FRAME(TYPE) \
...
...
@@ -1538,7 +1536,7 @@ cmd_tx11obj(CMD_ARGS)
f
.
flags
|=
PRIORITY
;
}
else
if
(
AV_IS
(
"-ex"
))
{
exclusive
=
1
<<
31
;
exclusive
=
1
U
<<
31
;
f
.
flags
|=
PRIORITY
;
}
else
if
(
AV_IS
(
"-weight"
))
{
...
...
@@ -2527,7 +2525,7 @@ stream_new(const char *name, struct http *h)
s
->
dependency
=
0
;
STRTOU32
(
s
->
id
,
name
,
p
,
h
->
vl
,
"stream"
);
if
(
s
->
id
&
(
1
<<
31
))
if
(
s
->
id
&
(
1
U
<<
31
))
vtc_log
(
h
->
vl
,
0
,
"Stream id must be a 31-bits integer "
"(found %s)"
,
name
);
...
...
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