[master] e38f702 No need to copy the VCL_conf struct anymore, it can be const.
Poul-Henning Kamp
phk at FreeBSD.org
Wed Jun 17 11:39:04 CEST 2015
commit e38f70269013cfaf53189f7addcf89860036ab72
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Jun 17 09:38:16 2015 +0000
No need to copy the VCL_conf struct anymore, it can be const.
diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index b751672..b5fd367 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -49,7 +49,7 @@ struct vcl {
#define VCL_MAGIC 0x214188f2
VTAILQ_ENTRY(vcl) list;
void *dlh;
- struct VCL_conf conf[1];
+ const struct VCL_conf *conf;
char state[8];
char *loaded_name;
unsigned busy;
@@ -205,7 +205,7 @@ VCL_Open(const char *fn, struct vsb *msg)
ALLOC_OBJ(vcl, VCL_MAGIC);
AN(vcl);
vcl->dlh = dlh;
- memcpy(vcl->conf, cnf, sizeof *cnf);
+ vcl->conf = cnf;
return (vcl);
}
More information about the varnish-commit
mailing list