aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc-clusapi.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-dcerpc-clusapi.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-dcerpc-clusapi.c')
-rw-r--r--epan/dissectors/packet-dcerpc-clusapi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-dcerpc-clusapi.c b/epan/dissectors/packet-dcerpc-clusapi.c
index 0dd82dfbaf..fdf3185dae 100644
--- a/epan/dissectors/packet-dcerpc-clusapi.c
+++ b/epan/dissectors/packet-dcerpc-clusapi.c
@@ -3232,7 +3232,7 @@ int
clusapi_dissect_bitmap_ClusterEnumType(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
{
proto_item *item;
- static const int * clusapi_ClusterEnumType_fields[] = {
+ static int * const clusapi_ClusterEnumType_fields[] = {
&hf_clusapi_ClusterEnumType_CLUSTER_ENUM_NODE,
&hf_clusapi_ClusterEnumType_CLUSTER_ENUM_RESTYPE,
&hf_clusapi_ClusterEnumType_CLUSTER_ENUM_RESOURCE,
@@ -3978,7 +3978,7 @@ int
clusapi_dissect_bitmap_ClusterGroupEnumType(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
{
proto_item *item;
- static const int * clusapi_ClusterGroupEnumType_fields[] = {
+ static int * const clusapi_ClusterGroupEnumType_fields[] = {
&hf_clusapi_ClusterGroupEnumType_CLUSTER_GROUP_ENUM_CONTAINS,
&hf_clusapi_ClusterGroupEnumType_CLUSTER_GROUP_ENUM_NODES,
NULL
@@ -4357,7 +4357,7 @@ int
clusapi_dissect_bitmap_ClusterResTypeEnumType(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
{
proto_item *item;
- static const int * clusapi_ClusterResTypeEnumType_fields[] = {
+ static int * const clusapi_ClusterResTypeEnumType_fields[] = {
&hf_clusapi_ClusterResTypeEnumType_CLUSTER_RESOURCE_TYPE_ENUM_NODES,
&hf_clusapi_ClusterResTypeEnumType_CLUSTER_RESOURCE_TYPE_ENUM_RESOURCES,
NULL
@@ -4475,7 +4475,7 @@ int
clusapi_dissect_bitmap_DesiredAccessMask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
{
proto_item *item;
- static const int * clusapi_clusapi_DesiredAccessMask_fields[] = {
+ static int * const clusapi_clusapi_DesiredAccessMask_fields[] = {
&hf_clusapi_clusapi_DesiredAccessMask_CLUSAPI_READ_ACCESS,
&hf_clusapi_clusapi_DesiredAccessMask_CLUSAPI_CHANGE_ACCESS,
&hf_clusapi_clusapi_DesiredAccessMask_CLUSAPI_GENERIC_READ,