aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-http2.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2020-06-18 18:14:46 -0700
committerAnders Broman <a.broman58@gmail.com>2020-06-19 11:32:26 +0000
commite1d9a226a2b8f2824a0eb162a8dc972e6e6c2dd4 (patch)
tree75f56e3f0dde68ec92613cea3f482f7f426625de /epan/dissectors/packet-http2.c
parent51bb2c4d7f515a24659ba0c0048392a81becda4e (diff)
Fix the type of arrays of pointers to hf_ values for bitfield routines.
The static arrays are supposed to be arrays of const pointers to int, not arrays of non-const pointers to const int. Fixing that means some bugs (scribbling on what's *supposed* to be a const array) will be caught (see packet-ieee80211-radiotap.c for examples, the first of which inspired this change and the second of which was discovered while testing compiles with this change), and removes the need for some annoying casts. Also make some of those arrays static while we're at it. Update documentation and dissector-generator tools. Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc Reviewed-on: https://code.wireshark.org/review/37517 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-http2.c')
-rw-r--r--epan/dissectors/packet-http2.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-http2.c b/epan/dissectors/packet-http2.c
index 465cb5cbe7..cdb2e564dd 100644
--- a/epan/dissectors/packet-http2.c
+++ b/epan/dissectors/packet-http2.c
@@ -2165,9 +2165,9 @@ dissect_http2_header_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *ht
{
guint64 flags_val;
- const int** fields;
+ int* const * fields;
- static const int* http2_hdr_flags[] = {
+ static int* const http2_hdr_flags[] = {
&hf_http2_flags_unused_headers,
&hf_http2_flags_priority,
&hf_http2_flags_padded,
@@ -2176,40 +2176,40 @@ dissect_http2_header_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *ht
NULL
};
- static const int* http2_data_flags[] = {
+ static int* const http2_data_flags[] = {
&hf_http2_flags_unused_data,
&hf_http2_flags_padded,
&hf_http2_flags_end_stream,
NULL
};
- static const int* http2_settings_flags[] = {
+ static int* const http2_settings_flags[] = {
&hf_http2_flags_unused_settings,
&hf_http2_flags_settings_ack,
NULL
};
- static const int* http2_push_promise_flags[] = {
+ static int* const http2_push_promise_flags[] = {
&hf_http2_flags_unused_push_promise,
&hf_http2_flags_padded,
&hf_http2_flags_end_headers,
NULL
};
- static const int* http2_continuation_flags[] = {
+ static int* const http2_continuation_flags[] = {
&hf_http2_flags_unused_continuation,
&hf_http2_flags_padded,
&hf_http2_flags_end_headers,
NULL
};
- static const int* http2_ping_flags[] = {
+ static int* const http2_ping_flags[] = {
&hf_http2_flags_unused_ping,
&hf_http2_flags_ping_ack,
NULL
};
- static const int* http2_unused_flags[] = {
+ static int* const http2_unused_flags[] = {
&hf_http2_flags_unused,
NULL
};