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
217c0e24
Commit
217c0e24
authored
Sep 05, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the VDP ptr argument const
parent
4f435cef
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
cache.h
bin/varnishd/cache/cache.h
+3
-2
cache_gzip.c
bin/varnishd/cache/cache_gzip.c
+1
-1
cache_http1_deliver.c
bin/varnishd/cache/cache_http1_deliver.c
+4
-3
No files found.
bin/varnishd/cache/cache.h
View file @
217c0e24
...
@@ -283,7 +283,8 @@ enum vdp_action {
...
@@ -283,7 +283,8 @@ enum vdp_action {
VDP_FLUSH
,
VDP_FLUSH
,
VDP_FINISH
,
VDP_FINISH
,
};
};
typedef
int
vdp_bytes
(
struct
req
*
,
enum
vdp_action
,
void
*
ptr
,
ssize_t
len
);
typedef
int
vdp_bytes
(
struct
req
*
,
enum
vdp_action
,
const
void
*
ptr
,
ssize_t
len
);
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
...
@@ -842,7 +843,7 @@ int HTTP1_IterateReqBody(struct req *req, req_body_iter_f *func, void *priv);
...
@@ -842,7 +843,7 @@ int HTTP1_IterateReqBody(struct req *req, req_body_iter_f *func, void *priv);
void
V1D_Deliver
(
struct
req
*
);
void
V1D_Deliver
(
struct
req
*
);
static
inline
int
static
inline
int
VDP_bytes
(
struct
req
*
req
,
enum
vdp_action
act
,
void
*
ptr
,
ssize_t
len
)
VDP_bytes
(
struct
req
*
req
,
enum
vdp_action
act
,
const
void
*
ptr
,
ssize_t
len
)
{
{
int
i
,
retval
;
int
i
,
retval
;
...
...
bin/varnishd/cache/cache_gzip.c
View file @
217c0e24
...
@@ -315,7 +315,7 @@ VGZ_WrwInit(struct vgz *vg)
...
@@ -315,7 +315,7 @@ VGZ_WrwInit(struct vgz *vg)
*/
*/
int
__match_proto__
(
vdp_bytes
)
int
__match_proto__
(
vdp_bytes
)
VDP_gunzip
(
struct
req
*
req
,
enum
vdp_action
act
,
void
*
ptr
,
ssize_t
len
)
VDP_gunzip
(
struct
req
*
req
,
enum
vdp_action
act
,
const
void
*
ptr
,
ssize_t
len
)
{
{
enum
vgzret_e
vr
;
enum
vgzret_e
vr
;
size_t
dl
;
size_t
dl
;
...
...
bin/varnishd/cache/cache_http1_deliver.c
View file @
217c0e24
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
static
int
__match_proto__
(
vdp_bytes
)
static
int
__match_proto__
(
vdp_bytes
)
v1d_bytes
(
struct
req
*
req
,
enum
vdp_action
act
,
void
*
ptr
,
ssize_t
len
)
v1d_bytes
(
struct
req
*
req
,
enum
vdp_action
act
,
const
void
*
ptr
,
ssize_t
len
)
{
{
ssize_t
wl
=
0
;
ssize_t
wl
=
0
;
...
@@ -58,11 +58,12 @@ v1d_bytes(struct req *req, enum vdp_action act, void *ptr, ssize_t len)
...
@@ -58,11 +58,12 @@ v1d_bytes(struct req *req, enum vdp_action act, void *ptr, ssize_t len)
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
static
int
__match_proto__
(
vdp_bytes
)
static
int
__match_proto__
(
vdp_bytes
)
v1d_range_bytes
(
struct
req
*
req
,
enum
vdp_action
act
,
void
*
ptr
,
ssize_t
len
)
v1d_range_bytes
(
struct
req
*
req
,
enum
vdp_action
act
,
const
void
*
ptr
,
ssize_t
len
)
{
{
int
retval
=
0
;
int
retval
=
0
;
ssize_t
l
;
ssize_t
l
;
char
*
p
=
ptr
;
c
onst
c
har
*
p
=
ptr
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
l
=
req
->
range_low
-
req
->
range_off
;
l
=
req
->
range_low
-
req
->
range_off
;
...
...
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