From: Alexander Zubkov Date: Tue, 22 Aug 2023 12:44:18 +0000 (+0200) Subject: Use more proper pointers to constant bytestrings X-Git-Tag: v2.14~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fea04d7c34b92d854cfcd4cc3db2dcba60caba7b;p=thirdparty%2Fbird.git Use more proper pointers to constant bytestrings --- diff --git a/conf/confbase.Y b/conf/confbase.Y index 3e8f58074..3dd5fed7f 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -94,7 +94,7 @@ CF_DECLS struct channel_limit cl; struct timeformat *tf; mpls_label_stack *mls; - struct bytestring *bs; + const struct bytestring *bs; } %token END CLI_MARKER INVALID_TOKEN ELSECOL DDOT diff --git a/proto/radv/config.Y b/proto/radv/config.Y index db6831942..eeafe6f45 100644 --- a/proto/radv/config.Y +++ b/proto/radv/config.Y @@ -26,7 +26,7 @@ static list radv_dns_list; /* Used by radv_rdnss and radv_dnssl */ static u8 radv_mult_val; /* Used by radv_mult for second return value */ static inline void -radv_add_to_custom_list(list *l, int type, struct bytestring *payload) +radv_add_to_custom_list(list *l, int type, const struct bytestring *payload) { if (type < 0 || type > 255) cf_error("RA cusom type must be in range 0-255"); struct radv_custom_config *cf = cfg_allocz(sizeof(struct radv_custom_config)); diff --git a/proto/radv/radv.h b/proto/radv/radv.h index 8c7161582..2baf0bad7 100644 --- a/proto/radv/radv.h +++ b/proto/radv/radv.h @@ -129,7 +129,7 @@ struct radv_custom_config { node n; u8 type; /* Identifier of the type of option */ - struct bytestring *payload; /* Payload of the option */ + const struct bytestring *payload; /* Payload of the option */ }; /*