diff options
-rw-r--r-- | epan/address_to_str.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-smb-common.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-smb-common.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-smb.c | 10 | ||||
-rw-r--r-- | epan/to_str.h | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/epan/address_to_str.c b/epan/address_to_str.c index 93b9f554d8..167f5084e5 100644 --- a/epan/address_to_str.c +++ b/epan/address_to_str.c @@ -117,7 +117,7 @@ tvb_ip_to_str(tvbuff_t *tvb, const gint offset) /* XXX FIXME remove this one later when every call has been converted to ep_address_to_str() */ -gchar * +const gchar * ip6_to_str(const struct e_in6_addr *ad) { gchar *str; @@ -127,7 +127,7 @@ ip6_to_str(const struct e_in6_addr *ad) { } #define IPV6_LENGTH 16 -gchar * +const gchar * tvb_ip6_to_str(tvbuff_t *tvb, const gint offset) { gchar *buf; diff --git a/epan/dissectors/packet-smb-common.c b/epan/dissectors/packet-smb-common.c index 0d77f6b987..71e5e7aeda 100644 --- a/epan/dissectors/packet-smb-common.c +++ b/epan/dissectors/packet-smb-common.c @@ -128,7 +128,7 @@ int display_unicode_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_i #define MAX_UNICODE_STR_LEN 256 int dissect_ms_compressed_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_index, - char **data) + const char **data) { int compr_len; const guchar *str = NULL; @@ -138,7 +138,7 @@ int dissect_ms_compressed_string(tvbuff_t *tvb, proto_tree *tree, int offset, in proto_tree_add_string(tree, hf_index, tvb, offset, compr_len, str); if (data) - *data = (char*) str; + *data = str; return offset + compr_len; } diff --git a/epan/dissectors/packet-smb-common.h b/epan/dissectors/packet-smb-common.h index b49a647f61..216457b3dc 100644 --- a/epan/dissectors/packet-smb-common.h +++ b/epan/dissectors/packet-smb-common.h @@ -37,7 +37,7 @@ int display_unicode_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_i int display_ms_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_index, char **data); int dissect_ms_compressed_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_index, - char **data); + const char **data); const gchar *get_unicode_or_ascii_string(tvbuff_t *tvb, int *offsetp, gboolean useunicode, int *len, gboolean nopad, gboolean exactlen, diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c index 8262ae3105..22b1760c28 100644 --- a/epan/dissectors/packet-smb.c +++ b/epan/dissectors/packet-smb.c @@ -993,17 +993,17 @@ const gchar *tree_ip_str(packet_info *pinfo, guint16 cmd) { if ( cmd == SMB_COM_READ_ANDX || cmd == SMB_COM_READ || cmd == SMB2_COM_READ) { - buf = (gchar *)ip_to_str((const guint8 *)pinfo->src.data); + buf = ip_to_str((const guint8 *)pinfo->src.data); } else { - buf = (gchar *)ip_to_str((const guint8 *)pinfo->dst.data); + buf = ip_to_str((const guint8 *)pinfo->dst.data); } } else { if ( cmd == SMB_COM_READ_ANDX || cmd == SMB_COM_READ || cmd == SMB2_COM_READ) { - buf = (gchar *)ip6_to_str((const struct e_in6_addr *)pinfo->src.data); + buf = ip6_to_str((const struct e_in6_addr *)pinfo->src.data); } else { - buf = (gchar *)ip6_to_str((const struct e_in6_addr *)pinfo->dst.data); + buf = ip6_to_str((const struct e_in6_addr *)pinfo->dst.data); } } @@ -7227,7 +7227,7 @@ dissect_session_setup_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree /* If we have found a uid->acct_name mapping, store it */ if (!pinfo->fd->flags.visited && si->sip) { int idx = 0; - if ((ntlmssph = (ntlmssp_header_t *)fetch_tapped_data(ntlmssp_tap_id, idx + 1 )) != NULL) { + if ((ntlmssph = (const ntlmssp_header_t *)fetch_tapped_data(ntlmssp_tap_id, idx + 1 )) != NULL) { if (ntlmssph && (ntlmssph->type == 3)) { smb_uid_t *smb_uid; diff --git a/epan/to_str.h b/epan/to_str.h index beb63eab8b..19e3a552a2 100644 --- a/epan/to_str.h +++ b/epan/to_str.h @@ -66,8 +66,8 @@ extern const gchar* fc_to_str(const guint8 *); extern gchar* fcwwn_to_str (const guint8 *); WS_DLL_PUBLIC const gchar* tvb_fc_to_str(tvbuff_t *tvb, const gint offset); WS_DLL_PUBLIC gchar* tvb_fcwwn_to_str (tvbuff_t *tvb, const gint offset); -WS_DLL_PUBLIC gchar* ip6_to_str(const struct e_in6_addr *); -WS_DLL_PUBLIC gchar* tvb_ip6_to_str(tvbuff_t *tvb, const gint offset); +WS_DLL_PUBLIC const gchar* ip6_to_str(const struct e_in6_addr *); +WS_DLL_PUBLIC const gchar* tvb_ip6_to_str(tvbuff_t *tvb, const gint offset); void ip6_to_str_buf(const struct e_in6_addr *, gchar *); extern gchar* ipx_addr_to_str(const guint32, const guint8 *); extern gchar* ipxnet_to_string(const guint8 *ad); |