aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc-spoolss.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-spoolss.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-spoolss.c')
-rw-r--r--epan/dissectors/packet-dcerpc-spoolss.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-dcerpc-spoolss.c b/epan/dissectors/packet-dcerpc-spoolss.c
index 854ceac91e..3c89a26888 100644
--- a/epan/dissectors/packet-dcerpc-spoolss.c
+++ b/epan/dissectors/packet-dcerpc-spoolss.c
@@ -1405,7 +1405,7 @@ dissect_DEVMODE_fields(tvbuff_t *tvb, gint offset, packet_info *pinfo,
guint32 fields;
proto_item *hidden_item;
- static const int * hf_fields[] = {
+ static int * const hf_fields[] = {
&hf_devmode_fields_orientation,
&hf_devmode_fields_papersize,
&hf_devmode_fields_paperlength,
@@ -2005,7 +2005,7 @@ dissect_job_status(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, dcerpc_info *di, guint8 *drep)
{
guint32 status;
- static const int * hf_status[] = {
+ static int * const hf_status[] = {
&hf_job_status_user_intervention,
&hf_job_status_blocked,
&hf_job_status_deleted,
@@ -2123,7 +2123,7 @@ dissect_printer_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, dcerpc_info *di, guint8 *drep)
{
guint32 attributes;
- static const int * hf_attributes[] = {
+ static int * const hf_attributes[] = {
&hf_printer_attributes_published,
&hf_printer_attributes_raw_only,
&hf_printer_attributes_enable_bidi,
@@ -2232,7 +2232,7 @@ dissect_printer_driver_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, dcerpc_info *di, guint8 *drep)
{
guint32 attributes;
- static const int * hf_attributes[] = {
+ static int * const hf_attributes[] = {
&hf_printer_driver_attributes_package_aware,
&hf_printer_driver_attributes_xps,
&hf_printer_driver_attributes_sandbox_enabled,
@@ -2882,7 +2882,7 @@ dissect_notify_options_flags(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, dcerpc_info *di, guint8 *drep)
{
guint32 flags;
- static const int * hf_flags[] = {
+ static int * const hf_flags[] = {
&hf_notify_options_flags_refresh,
NULL
};
@@ -3061,7 +3061,7 @@ SpoolssRFFPCNEX_q(tvbuff_t *tvb, int offset,
dcerpc_info *di, guint8 *drep)
{
guint32 flags;
- static const int * hf_flags[] = {
+ static int * const hf_flags[] = {
&hf_rffpcnex_flags_timeout,
&hf_rffpcnex_flags_delete_driver,
&hf_rffpcnex_flags_set_driver,
@@ -3833,7 +3833,7 @@ SpoolssEnumPrinters_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
guint32 level, flags;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
- static const int * hf_flags[] = {
+ static int * const hf_flags[] = {
&hf_enumprinters_flags_network,
&hf_enumprinters_flags_shared,
&hf_enumprinters_flags_remote,