From: phk Date: Fri, 26 Sep 2008 13:07:51 +0000 (+0000) Subject: Constify three strings in compiled VCL data structure vrt_backend X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d536c7e330feb7a1ab773614d8fde67802c477c;p=varnish Constify three strings in compiled VCL data structure vrt_backend git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3229 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/include/vrt.h b/varnish-cache/include/vrt.h index 121d9bf8..3a1aa86b 100644 --- a/varnish-cache/include/vrt.h +++ b/varnish-cache/include/vrt.h @@ -60,10 +60,10 @@ struct vrt_backend_probe { * A backend is a host+port somewhere on the network */ struct vrt_backend { - char *vcl_name; - char *ident; + const char *vcl_name; + const char *ident; - char *hosthdr; + const char *hosthdr; const unsigned char *ipv4_sockaddr; const unsigned char *ipv6_sockaddr; diff --git a/varnish-cache/lib/libvcl/vcc_fixed_token.c b/varnish-cache/lib/libvcl/vcc_fixed_token.c index 4de263ae..3dcf753c 100644 --- a/varnish-cache/lib/libvcl/vcc_fixed_token.c +++ b/varnish-cache/lib/libvcl/vcc_fixed_token.c @@ -340,10 +340,10 @@ vcl_output_lang_h(struct vsb *sb) vsb_cat(sb, " * A backend is a host+port somewhere on the network\n"); vsb_cat(sb, " */\n"); vsb_cat(sb, "struct vrt_backend {\n"); - vsb_cat(sb, " char *vcl_name;\n"); - vsb_cat(sb, " char *ident;\n"); + vsb_cat(sb, " const char *vcl_name;\n"); + vsb_cat(sb, " const char *ident;\n"); vsb_cat(sb, "\n"); - vsb_cat(sb, " char *hosthdr;\n"); + vsb_cat(sb, " const char *hosthdr;\n"); vsb_cat(sb, "\n"); vsb_cat(sb, " const unsigned char *ipv4_sockaddr;\n"); vsb_cat(sb, " const unsigned char *ipv6_sockaddr;\n");