Make some items that don't need to be size_t guint.
Those sizes are limited by the packet sizes we support, and we only support a maximum packet size of 2^32. This squelches some compiler warnings. Remove some casts that this renders unnecessary. Change-Id: Id9a7bcf8c2ce30bbed7be6c0e28deb9cf38002e0 Reviewed-on: https://code.wireshark.org/review/19279 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
e6a9877c71
commit
c65e5851b2
|
@ -42,8 +42,8 @@ struct _rtp_info {
|
|||
guint32 info_sync_src;
|
||||
guint info_data_len; /* length of raw rtp data as reported */
|
||||
gboolean info_all_data_present; /* FALSE if data is cut off */
|
||||
size_t info_payload_offset; /* start of payload relative to info_data */
|
||||
size_t info_payload_len; /* length of payload (incl padding) */
|
||||
guint info_payload_offset; /* start of payload relative to info_data */
|
||||
guint info_payload_len; /* length of payload (incl padding) */
|
||||
gboolean info_is_srtp;
|
||||
guint32 info_setup_frame_num; /* the frame num of the packet that set this RTP connection */
|
||||
const guint8* info_data; /* pointer to raw rtp data */
|
||||
|
|
|
@ -783,7 +783,7 @@ rtp_packet_save_payload(tap_rtp_save_info_t *saveinfo,
|
|||
saveinfo->error_type = TAP_RTP_FILE_WRITE_ERROR;
|
||||
return 0;
|
||||
}
|
||||
saveinfo->count += ((int)rtpinfo->info_payload_len - rtpinfo->info_padding_count);
|
||||
saveinfo->count += rtpinfo->info_payload_len - rtpinfo->info_padding_count;
|
||||
|
||||
fflush(saveinfo->fp);
|
||||
saveinfo->saved = TRUE;
|
||||
|
|
|
@ -139,7 +139,7 @@ void RtpAudioStream::addRtpPacket(const struct _packet_info *pinfo, const struct
|
|||
rtp_packet_t *rtp_packet = g_new0(rtp_packet_t, 1);
|
||||
rtp_packet->info = (struct _rtp_info *) g_memdup(rtp_info, sizeof(struct _rtp_info));
|
||||
if (rtp_info->info_all_data_present && (rtp_info->info_payload_len != 0)) {
|
||||
rtp_packet->payload_data = (guint8 *) g_memdup(&(rtp_info->info_data[rtp_info->info_payload_offset]), (guint) rtp_info->info_payload_len);
|
||||
rtp_packet->payload_data = (guint8 *) g_memdup(&(rtp_info->info_data[rtp_info->info_payload_offset]), rtp_info->info_payload_len);
|
||||
}
|
||||
|
||||
if (rtp_packets_.size() < 1) { // First packet
|
||||
|
|
Loading…
Reference in New Issue