diff options
author | Anders Broman <anders.broman@ericsson.com> | 2009-03-29 18:26:06 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2009-03-29 18:26:06 +0000 |
commit | b666a7942e9a8e01c2aaf605f4851c05350c8e5c (patch) | |
tree | 96de522fad363580170038df86ef3eafe61fa38b /epan/dissectors | |
parent | 564e51f8ccd7c66f1701f579cc1098cd78a7aa9b (diff) |
More size_t casts.
svn path=/trunk/; revision=27887
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-ndps.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-nfs.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-pcnfsd.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-pvfs2.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-radius.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-rtp.c | 18 | ||||
-rw-r--r-- | epan/dissectors/packet-sap.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-smb-sidsnooping.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-smpp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-srvloc.c | 6 |
10 files changed, 26 insertions, 26 deletions
diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c index 6acabfc7b0..24e2d26531 100644 --- a/epan/dissectors/packet-ndps.c +++ b/epan/dissectors/packet-ndps.c @@ -2626,7 +2626,7 @@ server_entry(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset) aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Server Info"); atree = proto_item_add_subtree(aitem, ett_ndps); foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, &server_name); - proto_item_append_text(aitem, ": %s", format_text(server_name, strlen(server_name))); + proto_item_append_text(aitem, ": %s", format_text(server_name, (int)strlen(server_name))); proto_tree_add_item(atree, hf_ndps_server_type, tvb, foffset, 4, FALSE); foffset += 4; foffset = print_address(tvb, atree, foffset); diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index c445f4ec2f..a2be4738d0 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -830,7 +830,7 @@ nfs_name_snoop_add_name(int xid, tvbuff_t *tvb, int name_offset, int name_len, i } if(name){ - nns->name_len=strlen(name); + nns->name_len=(int)strlen(name); nns->name=g_strdup(name); } else { nns->name_len=name_len; diff --git a/epan/dissectors/packet-pcnfsd.c b/epan/dissectors/packet-pcnfsd.c index 5a6fd5fb32..c2289e1002 100644 --- a/epan/dissectors/packet-pcnfsd.c +++ b/epan/dissectors/packet-pcnfsd.c @@ -211,11 +211,11 @@ dissect_pcnfsd2_auth_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, } if (ident) { - pcnfsd_decode_obscure(ident, strlen(ident)); + pcnfsd_decode_obscure(ident, (int)strlen(ident)); if (ident_tree) proto_tree_add_string(ident_tree, hf_pcnfsd_auth_ident_clear, - tvb, offset+4, strlen(ident), ident); + tvb, offset+4, (gint)strlen(ident), ident); } if (ident_item) { proto_item_set_text(ident_item, "Authentication Ident: %s", @@ -238,11 +238,11 @@ dissect_pcnfsd2_auth_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, } if (password) { - pcnfsd_decode_obscure(password, strlen(password)); + pcnfsd_decode_obscure(password, (int)strlen(password)); if (password_tree) proto_tree_add_string(password_tree, hf_pcnfsd_auth_password_clear, - tvb, offset+4, strlen(password), password); + tvb, offset+4, (gint)strlen(password), password); } if (password_item) { proto_item_set_text(password_item, "Authentication Password: %s", diff --git a/epan/dissectors/packet-pvfs2.c b/epan/dissectors/packet-pvfs2.c index ae444468f4..b81d0bd793 100644 --- a/epan/dissectors/packet-pvfs2.c +++ b/epan/dissectors/packet-pvfs2.c @@ -867,9 +867,9 @@ dissect_pvfs_opaque_data(tvbuff_t *tvb, int offset, guint16 string_buffer_size = 0; formatted = format_text((guint8 *)string_buffer, - strlen(string_buffer)); + (int)strlen(string_buffer)); - string_buffer_size = strlen(formatted) + 12 + 1; + string_buffer_size = (guint16)strlen(formatted) + 12 + 1; /* alloc maximum data area */ string_buffer_print = (char*) ep_alloc(string_buffer_size); @@ -891,7 +891,7 @@ dissect_pvfs_opaque_data(tvbuff_t *tvb, int offset, if (string_data) { string_buffer_print = (char *) ep_strdup(format_text((guint8 *) string_buffer, - strlen(string_buffer))); + (int)strlen(string_buffer))); } else { string_buffer_print="<DATA>"; } diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c index 1981a28ea8..70696d4094 100644 --- a/epan/dissectors/packet-radius.c +++ b/epan/dissectors/packet-radius.c @@ -437,7 +437,7 @@ radius_decrypt_avp(gchar *dest,int dest_len,tvbuff_t *tvb,int offset,int length) dest_len -= 1; /* Need to add trailing \" */ md5_init(&md_ctx); - md5_append(&md_ctx,(const guint8*)shared_secret,strlen(shared_secret)); + md5_append(&md_ctx,(const guint8*)shared_secret,(int)strlen(shared_secret)); md5_append(&md_ctx,authenticator, AUTHENTICATOR_LENGTH); md5_finish(&md_ctx,digest); diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c index 90f039f0fb..b624c32d73 100644 --- a/epan/dissectors/packet-rtp.c +++ b/epan/dissectors/packet-rtp.c @@ -309,33 +309,33 @@ const value_string rtp_payload_type_vals[] = const value_string rtp_payload_type_short_vals[] = { - { PT_PCMU, "g711U" }, + { PT_PCMU, "G711U" }, { PT_1016, "fs-1016" }, - { PT_G721, "g721" }, + { PT_G721, "G721" }, { PT_GSM, "GSM" }, - { PT_G723, "g723" }, + { PT_G723, "G723" }, { PT_DVI4_8000, "DVI4 8k" }, { PT_DVI4_16000, "DVI4 16k" }, { PT_LPC, "Exp. from Xerox PARC" }, - { PT_PCMA, "g711A" }, - { PT_G722, "g722" }, + { PT_PCMA, "G711A" }, + { PT_G722, "G722" }, { PT_L16_STEREO, "16-bit audio, stereo" }, { PT_L16_MONO, "16-bit audio, monaural" }, { PT_QCELP, "Qualcomm" }, { PT_CN, "CN" }, { PT_MPA, "MPEG-I/II Audio"}, - { PT_G728, "g728" }, + { PT_G728, "G728" }, { PT_DVI4_11025, "DVI4 11k" }, { PT_DVI4_22050, "DVI4 22k" }, - { PT_G729, "g729" }, + { PT_G729, "G729" }, { PT_CN_OLD, "CN(old)" }, { PT_CELB, "CellB" }, { PT_JPEG, "JPEG" }, { PT_NV, "NV" }, - { PT_H261, "h261" }, + { PT_H261, "H261" }, { PT_MPV, "MPEG-I/II Video"}, { PT_MP2T, "MPEG-II streams"}, - { PT_H263, "h263" }, + { PT_H263, "H263" }, { 0, NULL }, }; #if 0 diff --git a/epan/dissectors/packet-sap.c b/epan/dissectors/packet-sap.c index 36d0617b01..149bbf233b 100644 --- a/epan/dissectors/packet-sap.c +++ b/epan/dissectors/packet-sap.c @@ -232,7 +232,7 @@ dissect_sap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } /* Do we have the optional payload type aka. MIME content specifier */ - if (tvb_strneql(tvb, offset, "v=", strlen("v="))) { + if (tvb_strneql(tvb, offset, "v=", (int)strlen("v="))) { gint remaining_len; guint32 pt_len; int pt_string_len; diff --git a/epan/dissectors/packet-smb-sidsnooping.c b/epan/dissectors/packet-smb-sidsnooping.c index 9f82abe94d..59e7854c72 100644 --- a/epan/dissectors/packet-smb-sidsnooping.c +++ b/epan/dissectors/packet-smb-sidsnooping.c @@ -292,7 +292,7 @@ sid_name_hash(gconstpointer k) const sid_name *sn = (const sid_name *)k; int i, sum; - for(sum=0,i=strlen(sn->sid)-1;i>=0;i--){ + for(sum=0,i=(int)strlen(sn->sid)-1;i>=0;i--){ sum+=sn->sid[i]; } diff --git a/epan/dissectors/packet-smpp.c b/epan/dissectors/packet-smpp.c index a571124d95..87d94d99d3 100644 --- a/epan/dissectors/packet-smpp.c +++ b/epan/dissectors/packet-smpp.c @@ -1801,8 +1801,8 @@ submit_sm(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, SET_ADDRESS(&save_src, pinfo->src.type, pinfo->src.len, pinfo->src.data); SET_ADDRESS(&save_dst, pinfo->dst.type, pinfo->dst.len, pinfo->dst.data); /* Set SMPP source and destination address */ - SET_ADDRESS(&(pinfo->src), AT_STRINGZ, 1+strlen(src_str), src_str); - SET_ADDRESS(&(pinfo->dst), AT_STRINGZ, 1+strlen(dst_str), dst_str); + SET_ADDRESS(&(pinfo->src), AT_STRINGZ, 1+(int)strlen(src_str), src_str); + SET_ADDRESS(&(pinfo->dst), AT_STRINGZ, 1+(int)strlen(dst_str), dst_str); tvb_msg = tvb_new_subset (tvb, offset, MIN(length, tvb_reported_length(tvb) - offset), length); call_dissector (gsm_sms_handle, tvb_msg, pinfo, top_tree); diff --git a/epan/dissectors/packet-srvloc.c b/epan/dissectors/packet-srvloc.c index a9e5750a1c..c43db9970c 100644 --- a/epan/dissectors/packet-srvloc.c +++ b/epan/dissectors/packet-srvloc.c @@ -550,14 +550,14 @@ attr_list(proto_tree *tree, int hf, tvbuff_t *tvb, int offset, int length, } /* Parse the attribute name */ tmp = tvb_get_ephemeral_faked_unicode(tvb, offset, (length-offset)/2, FALSE); - type_len = strcspn(tmp, "="); + type_len = (int)strcspn(tmp, "="); attr_type = tvb_get_ephemeral_faked_unicode(tvb, offset, type_len, FALSE); proto_tree_add_string(tree, hf, tvb, offset, type_len*2, attr_type); offset += (type_len*2)+2; /* If this is the attribute svcname */ if (strcmp(attr_type, "svcname-ws")==0) { tmp = tvb_get_ephemeral_faked_unicode(tvb, offset, (length-offset)/2, FALSE); - type_len = strcspn(tmp, ")"); + type_len = (int)strcspn(tmp, ")"); add_v1_string(tree, hf_srvloc_srvrply_svcname, tvb, offset, type_len*2, encoding); offset += (type_len*2)+4; attr_type[0] = '\0'; @@ -635,7 +635,7 @@ attr_list(proto_tree *tree, int hf, tvbuff_t *tvb, int offset, int length, break; case CHARSET_UTF_8: - type_len = strcspn(tvb_get_ptr(tvb, offset, length), "="); + type_len = (int)strcspn(tvb_get_ptr(tvb, offset, length), "="); attr_type = unicode_to_bytes(tvb, offset+1, type_len-1, FALSE); proto_tree_add_string(tree, hf, tvb, offset+1, type_len-1, attr_type); i=1; |