diff options
author | Jörg Mayer <jmayer@loplof.de> | 2005-08-05 00:23:22 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2005-08-05 00:23:22 +0000 |
commit | 69dcb66cd9d74b27f85a1dceca2735fd68732c1b (patch) | |
tree | 3c3e24728558c5082c714381cfbb089836bcdac2 /epan/dissectors | |
parent | 63728d5770c3eae2cbc2130454eca1188c8c12e5 (diff) |
More char -> const char warning fixes
svn path=/trunk/; revision=15218
Diffstat (limited to 'epan/dissectors')
31 files changed, 83 insertions, 81 deletions
diff --git a/epan/dissectors/packet-gssapi.c b/epan/dissectors/packet-gssapi.c index bc16e2352c..8321b811cb 100644 --- a/epan/dissectors/packet-gssapi.c +++ b/epan/dissectors/packet-gssapi.c @@ -80,8 +80,8 @@ gssapi_oid_hash(gconstpointer k) } void -gssapi_init_oid(char *oid, int proto, int ett, dissector_handle_t handle, - dissector_handle_t wrap_handle, gchar *comment) +gssapi_init_oid(const char *oid, int proto, int ett, dissector_handle_t handle, + dissector_handle_t wrap_handle, const gchar *comment) { char *key = g_strdup(oid); gssapi_oid_value *value = g_malloc(sizeof(*value)); diff --git a/epan/dissectors/packet-gssapi.h b/epan/dissectors/packet-gssapi.h index b745dd3135..bcab10bfac 100644 --- a/epan/dissectors/packet-gssapi.h +++ b/epan/dissectors/packet-gssapi.h @@ -33,14 +33,14 @@ typedef struct _gssapi_oid_value { int ett; dissector_handle_t handle; dissector_handle_t wrap_handle; - gchar *comment; /* For the comment */ + const gchar *comment; /* For the comment */ } gssapi_oid_value; /* Function prototypes */ void -gssapi_init_oid(char *oid, int proto, int ett, dissector_handle_t handle, - dissector_handle_t wrap_handle, gchar *comment); +gssapi_init_oid(const char *oid, int proto, int ett, dissector_handle_t handle, + dissector_handle_t wrap_handle, const gchar *comment); gssapi_oid_value * gssapi_lookup_oid_str(gchar *oid_key); diff --git a/epan/dissectors/packet-ncp2222.inc b/epan/dissectors/packet-ncp2222.inc index dcd97b2b4b..b762269556 100644 --- a/epan/dissectors/packet-ncp2222.inc +++ b/epan/dissectors/packet-ncp2222.inc @@ -1035,41 +1035,41 @@ typedef struct { guint8 vtype; guint32 vvalue; char* vstring; - char* vdesc; + const char* vdesc; guint32 vlength; guint32 voffset; guint32 hfname; - char* bit1; + const char* bit1; guint32 bit1hfname; - char* bit2; + const char* bit2; guint32 bit2hfname; - char* bit3; + const char* bit3; guint32 bit3hfname; - char* bit4; + const char* bit4; guint32 bit4hfname; - char* bit5; + const char* bit5; guint32 bit5hfname; - char* bit6; + const char* bit6; guint32 bit6hfname; - char* bit7; + const char* bit7; guint32 bit7hfname; - char* bit8; + const char* bit8; guint32 bit8hfname; - char* bit9; + const char* bit9; guint32 bit9hfname; - char* bit10; + const char* bit10; guint32 bit10hfname; - char* bit11; + const char* bit11; guint32 bit11hfname; - char* bit12; + const char* bit12; guint32 bit12hfname; - char* bit13; + const char* bit13; guint32 bit13hfname; - char* bit14; + const char* bit14; guint32 bit14hfname; - char* bit15; + const char* bit15; guint32 bit15hfname; - char* bit16; + const char* bit16; guint32 bit16hfname; guint8 mvtype; guint32 vflags; diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c index 2a47954906..1420f6eab5 100644 --- a/epan/dissectors/packet-ndmp.c +++ b/epan/dissectors/packet-ndmp.c @@ -1126,7 +1126,7 @@ dissect_execute_cdb_cdb(tvbuff_t *tvb, int offset, packet_info *pinfo, static int dissect_execute_cdb_payload(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, - char *name, int hf_len, gboolean isreq) + const char *name, int hf_len, gboolean isreq) { proto_item* item = NULL; proto_tree* tree = NULL; diff --git a/epan/dissectors/packet-nlsp.c b/epan/dissectors/packet-nlsp.c index 88fa5f265e..598c4ecbd7 100644 --- a/epan/dissectors/packet-nlsp.c +++ b/epan/dissectors/packet-nlsp.c @@ -121,10 +121,10 @@ static const true_false_string supported_string = { * Our sub-packet dismantle structure for CLV's */ typedef struct { - int optcode; /* code for option */ - char *tree_text; /* text for fold out */ - gint *tree_id; /* id for add_item */ - void (*dissect)(tvbuff_t *tvb, proto_tree *tree, + int optcode; /* code for option */ + const char *tree_text; /* text for fold out */ + gint *tree_id; /* id for add_item */ + void (*dissect)(tvbuff_t *tvb, proto_tree *tree, int offset, int length); } nlsp_clv_handle_t; @@ -148,7 +148,7 @@ typedef struct { */ static void nlsp_dissect_unknown(tvbuff_t *tvb, proto_tree *tree, int offset, - char *fmat, ...) + const char *fmat, ...) { va_list ap; diff --git a/epan/dissectors/packet-nntp.c b/epan/dissectors/packet-nntp.c index 71478fcd07..77b5aca40d 100644 --- a/epan/dissectors/packet-nntp.c +++ b/epan/dissectors/packet-nntp.c @@ -45,7 +45,7 @@ static gint ett_nntp = -1; static void dissect_nntp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - gchar *type; + const gchar *type; proto_tree *nntp_tree; proto_item *ti; gint offset = 0; diff --git a/epan/dissectors/packet-nt-sonmp.c b/epan/dissectors/packet-nt-sonmp.c index 827b72e275..7d129215a6 100644 --- a/epan/dissectors/packet-nt-sonmp.c +++ b/epan/dissectors/packet-nt-sonmp.c @@ -211,7 +211,7 @@ static gint ett_sonmp = -1; static void dissect_sonmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - char *hello_type; + const char *hello_type; proto_tree *sonmp_tree = NULL; proto_item *ti; diff --git a/epan/dissectors/packet-ntp.c b/epan/dissectors/packet-ntp.c index 2c05012dd8..3629f1adcd 100644 --- a/epan/dissectors/packet-ntp.c +++ b/epan/dissectors/packet-ntp.c @@ -155,8 +155,8 @@ static const value_string mode_types[] = { * their Reference Clock ID (4bytes field) according to following table: */ static const struct { - char *id; - char *data; + const char *id; + const char *data; } primary_sources[] = { { "LOCL", "uncalibrated local clock" }, { "PPS\0", "atomic clock or other pulse-per-second source" }, @@ -417,7 +417,7 @@ dissect_ntp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree *ntp_tree; proto_item *ti; guint8 flags; - char *infostr; + const char *infostr; void (*dissector)(tvbuff_t *, proto_item *, guint8); if (check_col(pinfo->cinfo, COL_PROTOCOL)) diff --git a/epan/dissectors/packet-osi-options.c b/epan/dissectors/packet-osi-options.c index 6b2cc0d8ee..65c595c013 100644 --- a/epan/dissectors/packet-osi-options.c +++ b/epan/dissectors/packet-osi-options.c @@ -277,7 +277,7 @@ static void dissect_option_rfd( const guchar error, const guchar field, int offset, guchar len, tvbuff_t *tvb, proto_tree *tree ) { guchar error_class = 0; - char *format_string[] = + const char *format_string[] = { "Reason for discard {General} : %s, in field %u", "Reason for discard {Address} : %s, in field %u", "Reason for discard {Source Routing}: %s, in field %u", diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c index 2219f30403..68f6da690f 100644 --- a/epan/dissectors/packet-ospf.c +++ b/epan/dissectors/packet-ospf.c @@ -1457,9 +1457,9 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 link_type; guint16 link_counter; guint8 tos_counter; - char *link_type_str; - char *link_type_short_str; - char *link_id; + const char *link_type_str; + const char *link_type_short_str; + const char *link_id; /* AS-external LSA */ guint8 options; @@ -1749,7 +1749,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree, /* router LSA */ guint8 link_type; - char *link_type_str; + const char *link_type_str; guint32 metric; guint8 router_lsa_flags; diff --git a/epan/dissectors/packet-pgm.c b/epan/dissectors/packet-pgm.c index de696e3fb5..bce9801f8a 100644 --- a/epan/dissectors/packet-pgm.c +++ b/epan/dissectors/packet-pgm.c @@ -484,11 +484,12 @@ static dissector_handle_t data_handle; * was the URL for the PGM draft. */ -static char * +static const char * optsstr(nchar_t opts) { static char msg[256]; - char *p = msg, *str; + char *p = msg; + const char *str; if (opts == 0) return(""); @@ -526,11 +527,12 @@ optsstr(nchar_t opts) } return(msg); } -static char * +static const char * paritystr(nchar_t parity) { static char msg[256]; - char *p = msg, *str; + char *p = msg; + const char *str; if (parity == 0) return(""); diff --git a/epan/dissectors/packet-pn-rt.c b/epan/dissectors/packet-pn-rt.c index dc75cf7eb9..0832e88a82 100644 --- a/epan/dissectors/packet-pn-rt.c +++ b/epan/dissectors/packet-pn-rt.c @@ -101,10 +101,10 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint8 u8DataStatus; guint8 u8TransferStatus; guint16 u16CycleCounter; - gchar *pszProtAddInfo; - gchar *pszProtShort; - gchar *pszProtSummary; - gchar *pszProtComment; + const gchar *pszProtAddInfo; + const gchar *pszProtShort; + const gchar *pszProtSummary; + const gchar *pszProtComment; proto_item *item = NULL; proto_tree *ds_tree = NULL; proto_tree *pn_rt_tree, *ti; diff --git a/epan/dissectors/packet-portmap.c b/epan/dissectors/packet-portmap.c index 6d938e782d..89f414a814 100644 --- a/epan/dissectors/packet-portmap.c +++ b/epan/dissectors/packet-portmap.c @@ -79,7 +79,7 @@ dissect_getport_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, guint32 proto, version; guint32 prog; const char *prog_name; - char *proto_name; + const char *proto_name; /* make sure we remember protocol type until the reply packet */ if(!pinfo->fd->flags.visited){ @@ -117,7 +117,7 @@ dissect_getport_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, /* protocol */ proto = tvb_get_ntohl(tvb, offset+8); - proto_name = (char *)ipprotostr(proto); + proto_name = ipprotostr(proto); proto_tree_add_uint_format(tree, hf_portmap_proto, tvb, offset+8, 4, proto, "Proto: %s (%u)", proto_name, proto); if (check_col(pinfo->cinfo, COL_INFO)) { diff --git a/epan/dissectors/packet-q931.c b/epan/dissectors/packet-q931.c index bee100c009..6524d17e50 100644 --- a/epan/dissectors/packet-q931.c +++ b/epan/dissectors/packet-q931.c @@ -1748,7 +1748,7 @@ dissect_q931_information_rate_ie(tvbuff_t *tvb, int offset, int len, static int dissect_q931_guint16_value(tvbuff_t *tvb, int offset, int len, - proto_tree *tree, char *label) + proto_tree *tree, const char *label) { guint8 octet; guint16 value; @@ -2312,7 +2312,7 @@ dissect_q931_user_user_ie(tvbuff_t *tvb, int offset, int len, */ static void dissect_q931_ia5_ie(tvbuff_t *tvb, int offset, int len, proto_tree *tree, - char *label) + const char *label) { if (len != 0) { proto_tree_add_text(tree, tvb, offset, len, "%s: %s", label, diff --git a/epan/dissectors/packet-q933.c b/epan/dissectors/packet-q933.c index 394fb96bd5..5ed24804e9 100644 --- a/epan/dissectors/packet-q933.c +++ b/epan/dissectors/packet-q933.c @@ -1433,7 +1433,7 @@ dissect_q933_ns_facilities_ie(tvbuff_t *tvb, int offset, int len, static int dissect_q933_guint16_value(tvbuff_t *tvb, int offset, int len, - proto_tree *tree, char *label) + proto_tree *tree, const char *label) { guint8 octet; guint16 value; @@ -1869,7 +1869,7 @@ dissect_q933_user_user_ie(tvbuff_t *tvb, int offset, int len, */ static void dissect_q933_ia5_ie(tvbuff_t *tvb, int offset, int len, proto_tree *tree, - char *label) + const char *label) { if (len != 0) { proto_tree_add_text(tree, tvb, offset, len, "%s: %s", label, diff --git a/epan/dissectors/packet-quakeworld.c b/epan/dissectors/packet-quakeworld.c index dea5e991ce..20a1712115 100644 --- a/epan/dissectors/packet-quakeworld.c +++ b/epan/dissectors/packet-quakeworld.c @@ -152,7 +152,7 @@ skipwhite: #define MAX_ARGS 80 static int cmd_argc = 0; static char *cmd_argv[MAX_ARGS]; -static char *cmd_null_string = ""; +static const char *cmd_null_string = ""; static int cmd_argv_start[MAX_ARGS]; static int cmd_argv_length[MAX_ARGS]; diff --git a/epan/dissectors/packet-radius.h b/epan/dissectors/packet-radius.h index 2543ae26e0..17b6959bea 100644 --- a/epan/dissectors/packet-radius.h +++ b/epan/dissectors/packet-radius.h @@ -35,7 +35,7 @@ typedef void (radius_attr_dissector_t)(radius_attr_info_t*, proto_tree*, packet_ typedef const gchar* (radius_avp_dissector_t)(proto_tree*,tvbuff_t*); struct _radius_attr_info_t { - gchar *name; + const gchar *name; guint code; gboolean encrypt; gboolean tagged; @@ -68,4 +68,4 @@ radius_attr_dissector_t radius_ifid; extern void radius_register_avp_dissector(guint32 vendor_id, guint32 attribute_id, radius_avp_dissector_t dissector); /* from radius_dict.l */ -radius_dictionary_t* radius_load_dictionary (gchar* directory, gchar* filename, gchar** err_str); +radius_dictionary_t* radius_load_dictionary (gchar* directory, const gchar* filename, gchar** err_str); diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c index a88330275b..11445a53ae 100644 --- a/epan/dissectors/packet-ranap.c +++ b/epan/dissectors/packet-ranap.c @@ -1241,7 +1241,7 @@ proto_tree_add_PERint32(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offse /* */ /*****************************************************************************/ static int -dissect_iE_Extension(tvbuff_t *tvb, proto_tree *tree, gint *offset, gint *bitoffset, char *description) +dissect_iE_Extension(tvbuff_t *tvb, proto_tree *tree, gint *offset, gint *bitoffset, const char *description) { proto_item *ext_item = NULL; proto_tree *ext_tree = NULL; @@ -1967,7 +1967,7 @@ dissect_transportLayerInformation(tvbuff_t *tvb, proto_tree *ie_tree, gint *offs static int -dissect_dataVolumeList (tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset, char *parname) +dissect_dataVolumeList (tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset, const char *parname) { proto_item *optionals_item = NULL; proto_tree *optionals_tree = NULL; diff --git a/epan/dissectors/packet-rdt.c b/epan/dissectors/packet-rdt.c index 30744477fe..008b8a4076 100644 --- a/epan/dissectors/packet-rdt.c +++ b/epan/dissectors/packet-rdt.c @@ -242,7 +242,7 @@ static const value_string packet_type_vals[] = void rdt_add_address(packet_info *pinfo, address *addr, int port, int other_port, - gchar *setup_method, guint32 setup_frame_number) + const gchar *setup_method, guint32 setup_frame_number) { address null_addr; conversation_t* p_conv; diff --git a/epan/dissectors/packet-rdt.h b/epan/dissectors/packet-rdt.h index 1786677e3b..20754f5c4e 100644 --- a/epan/dissectors/packet-rdt.h +++ b/epan/dissectors/packet-rdt.h @@ -38,5 +38,5 @@ struct _rdt_conversation_info void rdt_add_address(packet_info *pinfo, address *addr, int port, int other_port, - gchar *setup_method, guint32 setup_frame_number); + const gchar *setup_method, guint32 setup_frame_number); diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c index e055649dae..dff9d7c918 100644 --- a/epan/dissectors/packet-rsvp.c +++ b/epan/dissectors/packet-rsvp.c @@ -1208,7 +1208,7 @@ static char *summary_session (tvbuff_t *tvb, int offset) static char *summary_template (tvbuff_t *tvb, int offset) { static char buf[80]; - char *objtype; + const char *objtype; if (tvb_get_guint8(tvb, offset+2) == RSVP_CLASS_FILTER_SPEC) objtype = "FILTERSPEC"; @@ -1368,7 +1368,7 @@ dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree, int tlv_off; guint16 tlv_type; guint tlv_len; - char *ifindex_name; + const char *ifindex_name; proto_tree *rsvp_ifid_subtree, *ti2; int offset2 = offset + 4; @@ -2855,7 +2855,7 @@ dissect_rsvp_label (proto_tree *ti, tvbuff_t *tvb, int offset2 = offset + 4; proto_tree *rsvp_object_tree; int mylen, i; - char *name; + const char *name; name = (class==RSVP_CLASS_SUGGESTED_LABEL ? "SUGGESTED LABEL": (class==RSVP_CLASS_UPSTREAM_LABEL ? "UPSTREAM LABEL": @@ -3909,7 +3909,7 @@ dissect_rsvp_gen_uni (proto_tree *ti, tvbuff_t *tvb, mylen = obj_length - 4; switch(type) { case 1: { - char *c; + const char *c; proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1, "C-type: 1"); for (i=1, l = 0; l < mylen; i++) { diff --git a/epan/dissectors/packet-sap.c b/epan/dissectors/packet-sap.c index cf3d7c70e0..85d279f505 100644 --- a/epan/dissectors/packet-sap.c +++ b/epan/dissectors/packet-sap.c @@ -222,7 +222,7 @@ dissect_sap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += auth_data_len; } if (is_enc || is_comp) { - char *mangle; + const char *mangle; if (is_enc && is_comp) mangle = "compressed and encrypted"; else if (is_enc) mangle = "encrypted"; else mangle = "compressed"; diff --git a/epan/dissectors/packet-scsi.c b/epan/dissectors/packet-scsi.c index dff4f51096..ccc8955b41 100644 --- a/epan/dissectors/packet-scsi.c +++ b/epan/dissectors/packet-scsi.c @@ -4166,7 +4166,7 @@ dissect_sbc2_readcapacity10 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * { guint8 flags; guint32 len, block_len, tot_len; - char *un; + const char *un; if (!tree) return; diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c index 76fb97ca2d..2fc1014564 100644 --- a/epan/dissectors/packet-sip.c +++ b/epan/dissectors/packet-sip.c @@ -125,8 +125,8 @@ static const char *sip_methods[] = { * Updated with: http://www.ietf.org/internet-drafts/draft-ietf-sip-resource-priority-05.txt */ typedef struct { - char *name; - char *compact_name; + const char *name; + const char *compact_name; } sip_header_t; static const sip_header_t sip_headers[] = { { "Unknown-header", NULL }, /* 0 Pad so that the real headers start at index 1 */ @@ -992,7 +992,7 @@ dissect_sip_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, tvbuff_t *next_tvb; gboolean is_known_request; gboolean found_match = FALSE; - char *descr; + const char *descr; guint token_1_len = 0; guint current_method_idx = 0; proto_item *ts = NULL, *ti = NULL, *th = NULL, *sip_element_item = NULL; diff --git a/epan/dissectors/packet-slsk.c b/epan/dissectors/packet-slsk.c index 9b9bb07ce2..0a8e99722f 100644 --- a/epan/dissectors/packet-slsk.c +++ b/epan/dissectors/packet-slsk.c @@ -217,7 +217,7 @@ static const value_string slsk_attr_type[] = { { 2, "VBR"}, }; -static char* connection_type(char con_type[]) { +static const char* connection_type(char con_type[]) { if (strlen(con_type) != 1) return "Unknown"; if (con_type[0] == 'D') return "Distributed Search"; if (con_type[0] == 'P') return "Peer Connection"; /* "File Search Result / User Info Request / Get Shared File List" */ @@ -225,7 +225,7 @@ static char* connection_type(char con_type[]) { return "Unknown"; } -static gboolean check_slsk_format(tvbuff_t *tvb, int offset, char format[]){ +static gboolean check_slsk_format(tvbuff_t *tvb, int offset, const char format[]){ /* * Returns TRUE if tvbuff beginning at offset matches a certain format diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c index b33c783aff..e8ac736a1d 100644 --- a/epan/dissectors/packet-smb.c +++ b/epan/dissectors/packet-smb.c @@ -1319,7 +1319,7 @@ static const true_false_string tfs_da_writetru = { "Write through disabled" }; static int -dissect_access(tvbuff_t *tvb, proto_tree *parent_tree, int offset, char *type) +dissect_access(tvbuff_t *tvb, proto_tree *parent_tree, int offset, const char *type) { guint16 mask; proto_item *item = NULL; diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c index 9938680952..8bcb4cf349 100644 --- a/epan/dissectors/packet-snmp.c +++ b/epan/dissectors/packet-snmp.c @@ -485,7 +485,7 @@ struct _SNMP_CNV guint class; guint tag; gint syntax; - gchar *name; + const gchar *name; }; static SNMP_CNV SnmpCnv [] = @@ -523,7 +523,7 @@ static SNMP_CNV SnmpCnv [] = * RETURNS: name on success, NULL on failure */ -static gchar * +static const gchar * snmp_tag_cls2syntax ( guint tag, guint cls, gushort *syntax) { SNMP_CNV *cnv; @@ -944,7 +944,7 @@ snmp_variable_decode(proto_tree *snmp_tree, gboolean def; guint vb_length; gushort vb_type; - gchar *vb_type_name; + const gchar *vb_type_name; int ret; guint cls, con, tag; diff --git a/epan/dissectors/packet-socks.c b/epan/dissectors/packet-socks.c index d0b12afcbc..84c79d18f1 100644 --- a/epan/dissectors/packet-socks.c +++ b/epan/dissectors/packet-socks.c @@ -181,7 +181,7 @@ typedef struct { -static char *address_type_table[] = { +static const char *address_type_table[] = { "Unknown", "IPv4", "Unknown", @@ -236,7 +236,7 @@ static GMemChunk *socks_vals = NULL; static int display_string(tvbuff_t *tvb, int offset, - proto_tree *tree, char *label){ + proto_tree *tree, const char *label){ /* display a string with a length, characters encoding */ /* they are displayed under a tree with the name in Label variable */ @@ -269,7 +269,7 @@ static int display_string(tvbuff_t *tvb, int offset, -static char *get_auth_method_name( guint Number){ +static const char *get_auth_method_name( guint Number){ /* return the name of the authenication method */ @@ -287,7 +287,7 @@ static char *get_auth_method_name( guint Number){ } -static char *get_command_name( guint Number){ +static const char *get_command_name( guint Number){ /* return the name of the command as a string */ diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c index f4e24d8873..fd3357887f 100644 --- a/epan/dissectors/packet-ssl.c +++ b/epan/dissectors/packet-ssl.c @@ -213,7 +213,7 @@ static gint ett_pct_exch_suites = -1; #define SSL_VER_PCT 4 /* corresponds to the #defines above */ -static gchar* ssl_version_short_names[] = { +static const gchar* ssl_version_short_names[] = { "SSL", "SSLv2", "SSLv3", diff --git a/epan/dissectors/packet-t38.c b/epan/dissectors/packet-t38.c index b917f0c6be..9a8795bbc5 100644 --- a/epan/dissectors/packet-t38.c +++ b/epan/dissectors/packet-t38.c @@ -177,7 +177,7 @@ static gboolean global_t38_show_setup_info = TRUE; void t38_add_address(packet_info *pinfo, address *addr, int port, int other_port, - gchar *setup_method, guint32 setup_frame_number) + const gchar *setup_method, guint32 setup_frame_number) { address null_addr; conversation_t* p_conv; diff --git a/epan/dissectors/packet-t38.h b/epan/dissectors/packet-t38.h index a972580d9f..49b1421d18 100644 --- a/epan/dissectors/packet-t38.h +++ b/epan/dissectors/packet-t38.h @@ -37,4 +37,4 @@ struct _t38_conversation_info void t38_add_address(packet_info *pinfo, address *addr, int port, int other_port, - gchar *setup_method, guint32 setup_frame_number); + const gchar *setup_method, guint32 setup_frame_number); |