aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-ieee80211.c2
-rw-r--r--epan/dissectors/packet-nfs.c2
-rw-r--r--epan/dissectors/packet-nfs.h2
-rw-r--r--epan/dissectors/packet-pdcp-lte.c12
-rw-r--r--epan/dissectors/packet-scsi.c2
-rw-r--r--epan/dissectors/packet-smb2.c24
-rw-r--r--epan/dissectors/packet-ssh.c2
-rw-r--r--epan/dissectors/packet-windows-common.h4
8 files changed, 25 insertions, 25 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index 343d9019b4..bd844987fe 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -178,7 +178,7 @@ static guint num_wepkeys_uat = 0;
static void* uat_wep_key_record_copy_cb(void* n, const void* o, size_t siz _U_) {
uat_wep_key_record_t* new_key = (uat_wep_key_record_t *)n;
- const uat_wep_key_record_t* old_key = (uat_wep_key_record_t *)o;
+ const uat_wep_key_record_t* old_key = (const uat_wep_key_record_t *)o;
if (old_key->string) {
new_key->string = g_strdup(old_key->string);
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
index d3af97b134..240ed1d717 100644
--- a/epan/dissectors/packet-nfs.c
+++ b/epan/dissectors/packet-nfs.c
@@ -4814,7 +4814,7 @@ static const true_false_string tfs_access_rights = {"allowed", "*Access Denied*"
proto_tree*
display_access_items(tvbuff_t* tvb, int offset, packet_info* pinfo, proto_tree* tree,
- guint32 amask, char mtype, int version, GString* optext, char* label)
+ guint32 amask, char mtype, int version, GString* optext, const char* label)
{
gboolean nfsv3 = (version==3 ? TRUE : FALSE);
proto_item* access_item = NULL;
diff --git a/epan/dissectors/packet-nfs.h b/epan/dissectors/packet-nfs.h
index 508c7658b0..09764999b3 100644
--- a/epan/dissectors/packet-nfs.h
+++ b/epan/dissectors/packet-nfs.h
@@ -197,7 +197,7 @@ extern int dissect_fattr(tvbuff_t *tvb, int offset, proto_tree *tree,
const char* name);
extern proto_tree* display_access_items(tvbuff_t* tvb, int offset, packet_info* pinfo, proto_tree* tree,
- guint32 amask, char mtype, int version, GString* optext, char* label);
+ guint32 amask, char mtype, int version, GString* optext, const char* label);
extern int dissect_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree,
int version, GString *optext);
diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c
index 50454b8d32..f744a8d057 100644
--- a/epan/dissectors/packet-pdcp-lte.c
+++ b/epan/dissectors/packet-pdcp-lte.c
@@ -347,8 +347,8 @@ static GHashTable *pdcp_sequence_analysis_channel_hash = NULL;
/* Equal keys */
static gint pdcp_channel_equal(gconstpointer v, gconstpointer v2)
{
- const pdcp_channel_hash_key* val1 = (pdcp_channel_hash_key *)v;
- const pdcp_channel_hash_key* val2 = (pdcp_channel_hash_key *)v2;
+ const pdcp_channel_hash_key* val1 = (const pdcp_channel_hash_key *)v;
+ const pdcp_channel_hash_key* val2 = (const pdcp_channel_hash_key *)v2;
/* All fields must match */
return (memcmp(val1, val2, sizeof(pdcp_channel_hash_key)) == 0);
@@ -357,7 +357,7 @@ static gint pdcp_channel_equal(gconstpointer v, gconstpointer v2)
/* Compute a hash value for a given key. */
static guint pdcp_channel_hash_func(gconstpointer v)
{
- const pdcp_channel_hash_key* val1 = (pdcp_channel_hash_key *)v;
+ const pdcp_channel_hash_key* val1 = (const pdcp_channel_hash_key *)v;
/* TODO: use multipliers */
return val1->ueId + val1->plane + val1->channelId + val1->direction;
@@ -376,8 +376,8 @@ typedef struct {
static gint pdcp_result_hash_equal(gconstpointer v, gconstpointer v2)
{
- const pdcp_result_hash_key* val1 = (pdcp_result_hash_key *)v;
- const pdcp_result_hash_key* val2 = (pdcp_result_hash_key *)v2;
+ const pdcp_result_hash_key* val1 = (const pdcp_result_hash_key *)v;
+ const pdcp_result_hash_key* val2 = (const pdcp_result_hash_key *)v2;
/* All fields must match */
return (memcmp(val1, val2, sizeof(pdcp_result_hash_key)) == 0);
@@ -386,7 +386,7 @@ static gint pdcp_result_hash_equal(gconstpointer v, gconstpointer v2)
/* Compute a hash value for a given key. */
static guint pdcp_result_hash_func(gconstpointer v)
{
- const pdcp_result_hash_key* val1 = (pdcp_result_hash_key *)v;
+ const pdcp_result_hash_key* val1 = (const pdcp_result_hash_key *)v;
/* TODO: check collision-rate / execution-time of these multipliers? */
return val1->frameNumber + (val1->channelId<<13) +
diff --git a/epan/dissectors/packet-scsi.c b/epan/dissectors/packet-scsi.c
index e7d944c0a2..cf120587e9 100644
--- a/epan/dissectors/packet-scsi.c
+++ b/epan/dissectors/packet-scsi.c
@@ -827,7 +827,7 @@ typedef void (*log_parameter_dissector)(tvbuff_t *tvb, packet_info *pinfo, proto
typedef struct _log_page_parameters_t {
guint32 number;
- char *name;
+ const char *name;
log_parameter_dissector dissector;
} log_page_parameters_t;
static const log_page_parameters_t tape_alert_log_parameters[] = {
diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c
index 592f5cf74c..807d489b9b 100644
--- a/epan/dissectors/packet-smb2.c
+++ b/epan/dissectors/packet-smb2.c
@@ -501,14 +501,14 @@ static const value_string smb2_find_info_levels[] = {
static gint
smb2_saved_info_equal_unmatched(gconstpointer k1, gconstpointer k2)
{
- smb2_saved_info_t *key1 = (smb2_saved_info_t *)k1;
- smb2_saved_info_t *key2 = (smb2_saved_info_t *)k2;
+ const smb2_saved_info_t *key1 = (const smb2_saved_info_t *)k1;
+ const smb2_saved_info_t *key2 = (const smb2_saved_info_t *)k2;
return key1->seqnum==key2->seqnum;
}
static guint
smb2_saved_info_hash_unmatched(gconstpointer k)
{
- smb2_saved_info_t *key = (smb2_saved_info_t *)k;
+ const smb2_saved_info_t *key = (const smb2_saved_info_t *)k;
guint32 hash;
hash=(guint32) (key->seqnum&0xffffffff);
@@ -522,14 +522,14 @@ smb2_saved_info_hash_unmatched(gconstpointer k)
static gint
smb2_saved_info_equal_matched(gconstpointer k1, gconstpointer k2)
{
- smb2_saved_info_t *key1 = (smb2_saved_info_t *)k1;
- smb2_saved_info_t *key2 = (smb2_saved_info_t *)k2;
+ const smb2_saved_info_t *key1 = (const smb2_saved_info_t *)k1;
+ const smb2_saved_info_t *key2 = (const smb2_saved_info_t *)k2;
return key1->seqnum==key2->seqnum;
}
static guint
smb2_saved_info_hash_matched(gconstpointer k)
{
- smb2_saved_info_t *key = (smb2_saved_info_t *)k;
+ const smb2_saved_info_t *key = (const smb2_saved_info_t *)k;
guint32 hash;
hash=(guint32) (key->seqnum&0xffffffff);
@@ -546,14 +546,14 @@ smb2_saved_info_hash_matched(gconstpointer k)
static gint
smb2_tid_info_equal(gconstpointer k1, gconstpointer k2)
{
- smb2_tid_info_t *key1 = (smb2_tid_info_t *)k1;
- smb2_tid_info_t *key2 = (smb2_tid_info_t *)k2;
+ const smb2_tid_info_t *key1 = (const smb2_tid_info_t *)k1;
+ const smb2_tid_info_t *key2 = (const smb2_tid_info_t *)k2;
return key1->tid==key2->tid;
}
static guint
smb2_tid_info_hash(gconstpointer k)
{
- smb2_tid_info_t *key = (smb2_tid_info_t *)k;
+ const smb2_tid_info_t *key = (const smb2_tid_info_t *)k;
guint32 hash;
hash=key->tid;
@@ -570,14 +570,14 @@ smb2_tid_info_hash(gconstpointer k)
static gint
smb2_sesid_info_equal(gconstpointer k1, gconstpointer k2)
{
- smb2_sesid_info_t *key1 = (smb2_sesid_info_t *)k1;
- smb2_sesid_info_t *key2 = (smb2_sesid_info_t *)k2;
+ const smb2_sesid_info_t *key1 = (const smb2_sesid_info_t *)k1;
+ const smb2_sesid_info_t *key2 = (const smb2_sesid_info_t *)k2;
return key1->sesid==key2->sesid;
}
static guint
smb2_sesid_info_hash(gconstpointer k)
{
- smb2_sesid_info_t *key = (smb2_sesid_info_t *)k;
+ const smb2_sesid_info_t *key = (const smb2_sesid_info_t *)k;
guint32 hash;
hash=(guint32)( ((key->sesid>>32)&0xffffffff)+((key->sesid)&0xffffffff) );
diff --git a/epan/dissectors/packet-ssh.c b/epan/dissectors/packet-ssh.c
index e07dc416c5..230aa5f0ff 100644
--- a/epan/dissectors/packet-ssh.c
+++ b/epan/dissectors/packet-ssh.c
@@ -946,7 +946,7 @@ ssh_gslist_compare_strings(gconstpointer a, gconstpointer b)
return -1;
if (b == NULL)
return 1;
- return strcmp((char*)a,(char*)b);
+ return strcmp((const char*)a,(const char*)b);
}
/* expects that *result is NULL */
diff --git a/epan/dissectors/packet-windows-common.h b/epan/dissectors/packet-windows-common.h
index 32e5781ee1..be8699cf8f 100644
--- a/epan/dissectors/packet-windows-common.h
+++ b/epan/dissectors/packet-windows-common.h
@@ -209,8 +209,8 @@ int dissect_nt_64bit_time(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_da
*/
typedef struct _sid_strings {
- char* sid;
- char* name;
+ const char* sid;
+ const char* name;
} sid_strings;
/* Dissect a NT SID. Label it with 'name' and return a string version