Commit 217c0e24 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make the VDP ptr argument const

parent 4f435cef
......@@ -283,7 +283,8 @@ enum vdp_action {
VDP_FLUSH,
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);
void V1D_Deliver(struct req *);
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;
......
......@@ -315,7 +315,7 @@ VGZ_WrwInit(struct vgz *vg)
*/
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;
size_t dl;
......
......@@ -36,7 +36,7 @@
/*--------------------------------------------------------------------*/
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;
......@@ -58,11 +58,12 @@ v1d_bytes(struct req *req, enum vdp_action act, void *ptr, ssize_t len)
/*--------------------------------------------------------------------*/
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;
ssize_t l;
char *p = ptr;
const char *p = ptr;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
l = req->range_low - req->range_off;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment