Fix some issues seen with cppcheck
This commit is contained in:
parent
ec353e89f3
commit
793365d0e0
|
@ -585,9 +585,9 @@ dissect_amqp_1_0_skip(tvbuff_t *tvb _U_, packet_info *pinfo _U_,
|
||||||
proto_item *item _U_, int hf_amqp_type _U_);
|
proto_item *item _U_, int hf_amqp_type _U_);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dissect_amqp_1_0_zero(tvbuff_t *tvb _U_, packet_info *pinfo _U_,
|
dissect_amqp_1_0_zero(tvbuff_t *tvb, packet_info *pinfo,
|
||||||
guint offset _U_, guint length _U_,
|
guint offset, guint length _U_,
|
||||||
proto_item *item _U_, int hf_amqp_type _U_);
|
proto_item *item, int hf_amqp_type);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dissect_amqp_1_0_true(tvbuff_t *tvb, packet_info *pinfo,
|
dissect_amqp_1_0_true(tvbuff_t *tvb, packet_info *pinfo,
|
||||||
|
@ -601,8 +601,8 @@ dissect_amqp_1_0_false(tvbuff_t *tvb, packet_info *pinfo,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
format_amqp_1_0_null(tvbuff_t *tvb _U_,
|
format_amqp_1_0_null(tvbuff_t *tvb _U_,
|
||||||
guint offset, guint length _U_,
|
guint offset _U_, guint length _U_,
|
||||||
const char **value _U_);
|
const char **value);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
format_amqp_1_0_boolean_true(tvbuff_t *tvb, guint offset, guint length _U_,
|
format_amqp_1_0_boolean_true(tvbuff_t *tvb, guint offset, guint length _U_,
|
||||||
|
|
|
@ -4788,7 +4788,7 @@ static int decode_bgp_link_node_nlri_common_fields(tvbuff_t *tvb,
|
||||||
length -= dissected_length;
|
length -= dissected_length;
|
||||||
|
|
||||||
/* dissect Local Node Descriptors TLV */
|
/* dissect Local Node Descriptors TLV */
|
||||||
if (length > 0 && length < 4) {
|
if (length < 4) {
|
||||||
expert_add_info_format(pinfo, tree, &ei_bgp_ls_error,
|
expert_add_info_format(pinfo, tree, &ei_bgp_ls_error,
|
||||||
"Unknown data in Link-State Link NLRI! length = %d bytes", length);
|
"Unknown data in Link-State Link NLRI! length = %d bytes", length);
|
||||||
return dissected_length;
|
return dissected_length;
|
||||||
|
|
|
@ -4453,7 +4453,7 @@ dissect_dns_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
ext_tree = proto_tree_add_subtree_format(dns_tree, tvb, cur_off, extraneous_length,
|
ext_tree = proto_tree_add_subtree_format(dns_tree, tvb, cur_off, extraneous_length,
|
||||||
ett_dns_extraneous, &it, "Extraneous Data (%d bytes)", extraneous_length);
|
ett_dns_extraneous, &it, "Extraneous Data (%d bytes)", extraneous_length);
|
||||||
|
|
||||||
it = proto_tree_add_item(ext_tree, hf_dns_extraneous_data, tvb, cur_off, extraneous_length, ENC_NA);
|
proto_tree_add_item(ext_tree, hf_dns_extraneous_data, tvb, cur_off, extraneous_length, ENC_NA);
|
||||||
|
|
||||||
it = proto_tree_add_int(ext_tree, hf_dns_extraneous_length, tvb, 0, 0, extraneous_length);
|
it = proto_tree_add_int(ext_tree, hf_dns_extraneous_length, tvb, 0, 0, extraneous_length);
|
||||||
proto_item_set_generated(it);
|
proto_item_set_generated(it);
|
||||||
|
|
|
@ -426,7 +426,7 @@ dissect_dtpt_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
proto_tree *dtpt_addrs_tree = NULL;
|
proto_tree *dtpt_addrs_tree = NULL;
|
||||||
guint32 blob_rawsize = 0;
|
guint32 blob_rawsize = 0;
|
||||||
guint32 blob_size = 0;
|
guint32 blob_size = 0;
|
||||||
guint32 blob_data_length = 0;
|
guint32 blob_data_length;
|
||||||
|
|
||||||
queryset_rawsize = tvb_get_letohl(tvb, offset + 0);
|
queryset_rawsize = tvb_get_letohl(tvb, offset + 0);
|
||||||
if (queryset_rawsize != 60) return 0;
|
if (queryset_rawsize != 60) return 0;
|
||||||
|
|
|
@ -2748,11 +2748,11 @@ static int decode_gtp_sig_pri_ind(tvbuff_t * tvb, int offset, packet_info * pinf
|
||||||
static int decode_gtp_sig_pri_ind_w_nsapi(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
static int decode_gtp_sig_pri_ind_w_nsapi(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
||||||
static int decode_gtp_higher_br_16mb_flg(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
static int decode_gtp_higher_br_16mb_flg(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
||||||
static int decode_gtp_max_mbr_apn_ambr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
static int decode_gtp_max_mbr_apn_ambr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
||||||
static int decode_gtp_add_mm_ctx_srvcc(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
static int decode_gtp_add_mm_ctx_srvcc(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree, session_args_t * args _U_);
|
||||||
static int decode_gtp_add_flgs_srvcc(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
static int decode_gtp_add_flgs_srvcc(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
||||||
static int decode_gtp_stn_sr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
static int decode_gtp_stn_sr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
||||||
static int decode_gtp_c_msisdn(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
static int decode_gtp_c_msisdn(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
||||||
static int decode_gtp_ext_ranap_cause(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
static int decode_gtp_ext_ranap_cause(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree, session_args_t * args _U_);
|
||||||
static int decode_gtp_ext_enodeb_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
static int decode_gtp_ext_enodeb_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
||||||
static int decode_gtp_ext_sel_mode_w_nsapi(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
static int decode_gtp_ext_sel_mode_w_nsapi(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
||||||
static int decode_gtp_ext_uli_timestamp(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
static int decode_gtp_ext_uli_timestamp(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, session_args_t * args _U_);
|
||||||
|
|
|
@ -12,11 +12,11 @@ extern void dissect_gtpv2_ie_common(tvbuff_t* tvb, packet_info* pinfo _U_, proto
|
||||||
|
|
||||||
extern void dissect_gtpv2_mbms_service_area(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
extern void dissect_gtpv2_mbms_service_area(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
||||||
extern void dissect_gtpv2_mbms_session_duration(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
extern void dissect_gtpv2_mbms_session_duration(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
||||||
extern void dissect_gtpv2_mbms_time_to_data_xfer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
extern void dissect_gtpv2_mbms_time_to_data_xfer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
||||||
extern void dissect_gtpv2_arp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
extern void dissect_gtpv2_arp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
||||||
extern void dissect_gtpv2_fq_csid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
extern void dissect_gtpv2_fq_csid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
||||||
extern void dissect_gtpv2_selec_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
extern void dissect_gtpv2_selec_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
||||||
extern void dissect_gtpv2_epc_timer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
extern void dissect_gtpv2_epc_timer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
||||||
extern void dissect_gtpv2_twan_identifier(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
extern void dissect_gtpv2_twan_identifier(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_);
|
||||||
/*Used by custom dissector*/
|
/*Used by custom dissector*/
|
||||||
extern gchar* dissect_gtpv2_tai(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, gboolean is_5gs);
|
extern gchar* dissect_gtpv2_tai(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, gboolean is_5gs);
|
||||||
|
|
|
@ -3982,7 +3982,6 @@ dissect_http_heur_tls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
conv_data = get_http_conversation_data(pinfo, &conversation);
|
|
||||||
dissect_http_tls(tvb, pinfo, tree, data);
|
dissect_http_tls(tvb, pinfo, tree, data);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4051,7 +4051,6 @@ proto_mpeg_descriptor_dissect_nordig_lcd_v2(tvbuff_t *tvb, guint offset, guint l
|
||||||
guint8 channel_list_id;
|
guint8 channel_list_id;
|
||||||
guint8 channel_list_name_length;
|
guint8 channel_list_name_length;
|
||||||
guint8 descriptor_length;
|
guint8 descriptor_length;
|
||||||
if (cnt < 1) return;
|
|
||||||
|
|
||||||
channel_list_id = tvb_get_guint8(tvb, offset);
|
channel_list_id = tvb_get_guint8(tvb, offset);
|
||||||
channel_list_tree = proto_tree_add_subtree_format(tree, tvb, offset, ch_list_len,
|
channel_list_tree = proto_tree_add_subtree_format(tree, tvb, offset, ch_list_len,
|
||||||
|
|
|
@ -4026,7 +4026,7 @@ de_nas_5gs_mm_extended_rejected_nssai(tvbuff_t* tvb, proto_tree* tree, packet_in
|
||||||
proto_tree* sub_partial_tree;
|
proto_tree* sub_partial_tree;
|
||||||
proto_tree* sub_rejected_tree;
|
proto_tree* sub_rejected_tree;
|
||||||
proto_item* item;
|
proto_item* item;
|
||||||
int i = 1;
|
int i;
|
||||||
guint num_partial_items = 1;
|
guint num_partial_items = 1;
|
||||||
guint32 curr_offset = offset;
|
guint32 curr_offset = offset;
|
||||||
guint32 type_of_list, number_of_element, nssai_len;
|
guint32 type_of_list, number_of_element, nssai_len;
|
||||||
|
@ -10256,10 +10256,9 @@ dissect_nas_5gs_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
str = json_get_string(json_data, cur_tok, "contentId");
|
str = json_get_string(json_data, cur_tok, "contentId");
|
||||||
} else {
|
} else {
|
||||||
/* TS 29.502 ch6.1.6.4.4 n1SmInfoFromUe, n1SmInfoToUe, unknownN1SmInfo */
|
/* TS 29.502 ch6.1.6.4.4 n1SmInfoFromUe, n1SmInfoToUe, unknownN1SmInfo */
|
||||||
if (!cur_tok) {
|
cur_tok = json_get_object(json_data, tokens, N1_SMINFO_FROM_UE);
|
||||||
cur_tok = json_get_object(json_data, tokens, N1_SMINFO_FROM_UE);
|
n1_msg_class = N1_SMINFO_FROM_UE;
|
||||||
n1_msg_class = N1_SMINFO_FROM_UE;
|
|
||||||
}
|
|
||||||
if (!cur_tok) {
|
if (!cur_tok) {
|
||||||
cur_tok = json_get_object(json_data, tokens, N1_SMINFO_TO_UE);
|
cur_tok = json_get_object(json_data, tokens, N1_SMINFO_TO_UE);
|
||||||
n1_msg_class = N1_SMINFO_TO_UE;
|
n1_msg_class = N1_SMINFO_TO_UE;
|
||||||
|
|
|
@ -717,7 +717,7 @@ dissect_pvfs2_attrmask(tvbuff_t *tvb, proto_tree *tree, int offset,
|
||||||
|
|
||||||
for (i = 0; i < 32; i++)
|
for (i = 0; i < 32; i++)
|
||||||
{
|
{
|
||||||
if (attrmask & (1 << i))
|
if (attrmask & (1u << i))
|
||||||
proto_tree_add_uint(attrtree, hf_pvfs_attr, tvb, offset, 4, i);
|
proto_tree_add_uint(attrtree, hf_pvfs_attr, tvb, offset, 4, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -662,7 +662,7 @@ dissect_sapms_adm_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
|
||||||
|
|
||||||
proto_item *record = NULL, *value = NULL;
|
proto_item *record = NULL, *value = NULL;
|
||||||
proto_tree *record_tree = NULL, *value_tree = NULL;
|
proto_tree *record_tree = NULL, *value_tree = NULL;
|
||||||
guint8 adm_opcode = 0;
|
guint8 adm_opcode;
|
||||||
|
|
||||||
while (length>=104){
|
while (length>=104){
|
||||||
|
|
||||||
|
|
|
@ -416,7 +416,7 @@ static int
|
||||||
dissect_saprouter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
dissect_saprouter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||||
{
|
{
|
||||||
tvbuff_t *next_tvb = NULL;
|
tvbuff_t *next_tvb = NULL;
|
||||||
guint8 opcode = 0;
|
guint8 opcode;
|
||||||
guint32 offset = 0, eyecatcher_length = 0;
|
guint32 offset = 0, eyecatcher_length = 0;
|
||||||
conversation_t *conversation = NULL;
|
conversation_t *conversation = NULL;
|
||||||
saprouter_session_state *session_state = NULL;
|
saprouter_session_state *session_state = NULL;
|
||||||
|
|
|
@ -1486,7 +1486,7 @@ dissect_rach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
guint32 ft;
|
guint32 ft;
|
||||||
guint32 header_crc = 0;
|
guint32 header_crc = 0;
|
||||||
proto_item * header_crc_pi = NULL;
|
proto_item * header_crc_pi = NULL;
|
||||||
guint header_length = 0;
|
guint header_length;
|
||||||
|
|
||||||
/* Header CRC */
|
/* Header CRC */
|
||||||
header_crc_pi = proto_tree_add_item_ret_uint(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN, &header_crc);
|
header_crc_pi = proto_tree_add_item_ret_uint(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN, &header_crc);
|
||||||
|
@ -1742,7 +1742,7 @@ dissect_fach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
guint32 ft;
|
guint32 ft;
|
||||||
guint32 header_crc = 0;
|
guint32 header_crc = 0;
|
||||||
proto_item * header_crc_pi = NULL;
|
proto_item * header_crc_pi = NULL;
|
||||||
guint header_length = 0;
|
guint header_length;
|
||||||
|
|
||||||
/* Header CRC */
|
/* Header CRC */
|
||||||
header_crc_pi = proto_tree_add_item_ret_uint(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN, &header_crc);
|
header_crc_pi = proto_tree_add_item_ret_uint(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN, &header_crc);
|
||||||
|
@ -2538,7 +2538,7 @@ dissect_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
{
|
{
|
||||||
guint32 ft;
|
guint32 ft;
|
||||||
guint32 cfn;
|
guint32 cfn;
|
||||||
guint header_length = 0;
|
guint header_length;
|
||||||
guint32 header_crc = 0;
|
guint32 header_crc = 0;
|
||||||
proto_item * header_crc_pi = NULL;
|
proto_item * header_crc_pi = NULL;
|
||||||
|
|
||||||
|
@ -2613,7 +2613,7 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
guint32 header_crc = 0;
|
guint32 header_crc = 0;
|
||||||
proto_item * header_crc_pi = NULL;
|
proto_item * header_crc_pi = NULL;
|
||||||
proto_item * item;
|
proto_item * item;
|
||||||
guint header_length = 0;
|
guint header_length;
|
||||||
rlc_info * rlcinf;
|
rlc_info * rlcinf;
|
||||||
|
|
||||||
if (p_fp_info->edch_type == 1) {
|
if (p_fp_info->edch_type == 1) {
|
||||||
|
@ -2645,7 +2645,7 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
else {
|
else {
|
||||||
/********************************/
|
/********************************/
|
||||||
/* E-DCH data here */
|
/* E-DCH data here */
|
||||||
guint bit_offset = 0;
|
guint bit_offset;
|
||||||
guint total_pdus = 0;
|
guint total_pdus = 0;
|
||||||
guint total_bits = 0;
|
guint total_bits = 0;
|
||||||
gboolean dissected = FALSE;
|
gboolean dissected = FALSE;
|
||||||
|
@ -3169,7 +3169,7 @@ dissect_hsdsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
int offset, struct fp_info *p_fp_info, void *data)
|
int offset, struct fp_info *p_fp_info, void *data)
|
||||||
{
|
{
|
||||||
guint32 ft;
|
guint32 ft;
|
||||||
guint header_length = 0;
|
guint header_length;
|
||||||
guint32 header_crc = 0;
|
guint32 header_crc = 0;
|
||||||
proto_item * header_crc_pi = NULL;
|
proto_item * header_crc_pi = NULL;
|
||||||
|
|
||||||
|
@ -3388,7 +3388,7 @@ dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
||||||
guint32 ft;
|
guint32 ft;
|
||||||
guint32 header_crc = 0;
|
guint32 header_crc = 0;
|
||||||
proto_item * header_crc_pi = NULL;
|
proto_item * header_crc_pi = NULL;
|
||||||
guint16 header_length = 0;
|
guint16 header_length;
|
||||||
|
|
||||||
/* Header CRC */
|
/* Header CRC */
|
||||||
header_crc_pi = proto_tree_add_item_ret_uint(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN, &header_crc);
|
header_crc_pi = proto_tree_add_item_ret_uint(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN, &header_crc);
|
||||||
|
@ -3649,7 +3649,7 @@ void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto
|
||||||
guint32 ft;
|
guint32 ft;
|
||||||
guint32 header_crc = 0;
|
guint32 header_crc = 0;
|
||||||
proto_item * header_crc_pi = NULL;
|
proto_item * header_crc_pi = NULL;
|
||||||
guint header_length = 0;
|
guint header_length;
|
||||||
|
|
||||||
/* Header CRC */
|
/* Header CRC */
|
||||||
header_crc_pi = proto_tree_add_item_ret_uint(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN, &header_crc);
|
header_crc_pi = proto_tree_add_item_ret_uint(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN, &header_crc);
|
||||||
|
|
|
@ -246,7 +246,7 @@ dissect_dlci_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, prot
|
||||||
"ISDN (%u)", efa);
|
"ISDN (%u)", efa);
|
||||||
proto_item_append_text(parameter_item, " (SAPI:%u TEI:%u EFA:ISDN (%u))",sapi,tei,efa);
|
proto_item_append_text(parameter_item, " (SAPI:%u TEI:%u EFA:ISDN (%u))",sapi,tei,efa);
|
||||||
}
|
}
|
||||||
else if (efa > 8175 && efa <= 8180){
|
else if (efa <= 8180){
|
||||||
proto_tree_add_uint_format_value(parameter_tree, hf_efa, parameter_tvb, offset, EFA_LENGTH, efa,
|
proto_tree_add_uint_format_value(parameter_tree, hf_efa, parameter_tvb, offset, EFA_LENGTH, efa,
|
||||||
"%s (%u)", val_to_str_const(efa, efa_values, "unknown EFA"),tvb_get_ntohs(parameter_tvb, offset));
|
"%s (%u)", val_to_str_const(efa, efa_values, "unknown EFA"),tvb_get_ntohs(parameter_tvb, offset));
|
||||||
proto_item_append_text(parameter_item, " (SAPI:%u TEI:%u EFA:%s (%u))",sapi,tei,val_to_str_const(efa, efa_values, "unknown EFA-value"),efa);
|
proto_item_append_text(parameter_item, " (SAPI:%u TEI:%u EFA:%s (%u))",sapi,tei,val_to_str_const(efa, efa_values, "unknown EFA-value"),efa);
|
||||||
|
|
|
@ -132,7 +132,7 @@ tvb_new_chain(tvbuff_t *parent, tvbuff_t *backing)
|
||||||
void
|
void
|
||||||
tvb_add_to_chain(tvbuff_t *parent, tvbuff_t *child)
|
tvb_add_to_chain(tvbuff_t *parent, tvbuff_t *child)
|
||||||
{
|
{
|
||||||
tvbuff_t *tmp = child;
|
tvbuff_t *tmp;
|
||||||
|
|
||||||
DISSECTOR_ASSERT(parent);
|
DISSECTOR_ASSERT(parent);
|
||||||
DISSECTOR_ASSERT(child);
|
DISSECTOR_ASSERT(child);
|
||||||
|
@ -4208,7 +4208,7 @@ tvb_find_line_end_unquoted(tvbuff_t *tvb, const gint offset, int len, gint *next
|
||||||
gint
|
gint
|
||||||
tvb_skip_wsp(tvbuff_t *tvb, const gint offset, const gint maxlength)
|
tvb_skip_wsp(tvbuff_t *tvb, const gint offset, const gint maxlength)
|
||||||
{
|
{
|
||||||
gint counter = offset;
|
gint counter;
|
||||||
gint end, tvb_len;
|
gint end, tvb_len;
|
||||||
guint8 tempchar;
|
guint8 tempchar;
|
||||||
|
|
||||||
|
@ -4237,7 +4237,7 @@ tvb_skip_wsp(tvbuff_t *tvb, const gint offset, const gint maxlength)
|
||||||
gint
|
gint
|
||||||
tvb_skip_wsp_return(tvbuff_t *tvb, const gint offset)
|
tvb_skip_wsp_return(tvbuff_t *tvb, const gint offset)
|
||||||
{
|
{
|
||||||
gint counter = offset;
|
gint counter;
|
||||||
guint8 tempchar;
|
guint8 tempchar;
|
||||||
|
|
||||||
DISSECTOR_ASSERT(tvb && tvb->initialized);
|
DISSECTOR_ASSERT(tvb && tvb->initialized);
|
||||||
|
|
|
@ -38,7 +38,7 @@ static gboolean do_uncompress(tvbuff_t *tvb, int offset, int in_size,
|
||||||
buf_flag_count = 32;
|
buf_flag_count = 32;
|
||||||
}
|
}
|
||||||
buf_flag_count--;
|
buf_flag_count--;
|
||||||
if ((buf_flags & (1 << buf_flag_count)) == 0) {
|
if ((buf_flags & (1u << buf_flag_count)) == 0) {
|
||||||
guint8 v = tvb_get_guint8(tvb, offset+in_off);
|
guint8 v = tvb_get_guint8(tvb, offset+in_off);
|
||||||
wmem_array_append_one(obuf, v);
|
wmem_array_append_one(obuf, v);
|
||||||
in_off++;
|
in_off++;
|
||||||
|
|
|
@ -819,10 +819,10 @@ parse_line(gchar *linebuff, gint line_length,
|
||||||
int n = 0;
|
int n = 0;
|
||||||
int port_digits;
|
int port_digits;
|
||||||
char port_number_string[MAX_PORT_DIGITS+1];
|
char port_number_string[MAX_PORT_DIGITS+1];
|
||||||
int variant_digits = 0;
|
int variant_digits;
|
||||||
int variant = 1;
|
int variant = 1;
|
||||||
int protocol_chars = 0;
|
int protocol_chars;
|
||||||
int outhdr_chars = 0;
|
int outhdr_chars;
|
||||||
|
|
||||||
char seconds_buff[MAX_SECONDS_CHARS+1];
|
char seconds_buff[MAX_SECONDS_CHARS+1];
|
||||||
int seconds_chars;
|
int seconds_chars;
|
||||||
|
|
|
@ -2202,7 +2202,7 @@ gzwfile_close(GZWFILE_T state)
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
/* flush, free memory, and close file */
|
/* flush, free memory, and close file */
|
||||||
if (gz_comp(state, Z_FINISH) == -1 && ret == 0)
|
if (gz_comp(state, Z_FINISH) == -1)
|
||||||
ret = state->err;
|
ret = state->err;
|
||||||
(void)deflateEnd(&(state->strm));
|
(void)deflateEnd(&(state->strm));
|
||||||
g_free(state->out);
|
g_free(state->out);
|
||||||
|
|
|
@ -267,15 +267,14 @@ wtap_open_return_val logcat_open(wtap *wth, int *err, gchar **err_info)
|
||||||
return WTAP_OPEN_ERROR; /* I/O error */
|
return WTAP_OPEN_ERROR; /* I/O error */
|
||||||
if (tmp_version == 0)
|
if (tmp_version == 0)
|
||||||
return WTAP_OPEN_NOT_MINE; /* not a logcat file */
|
return WTAP_OPEN_NOT_MINE; /* not a logcat file */
|
||||||
if (tmp_version != -2) {
|
|
||||||
/*
|
/*
|
||||||
* we've read three packets and the first two have the same
|
* we've read three packets and the first two have the same
|
||||||
* version; does the third have the same version?
|
* version; does the third have the same version?
|
||||||
*/
|
*/
|
||||||
if (tmp_version != version) {
|
if (tmp_version != version) {
|
||||||
/* no, so this is presumably not a logcat file */
|
/* no, so this is presumably not a logcat file */
|
||||||
return WTAP_OPEN_NOT_MINE;
|
return WTAP_OPEN_NOT_MINE;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3999,7 +3999,7 @@ static guint32 pcapng_compute_packet_verdict_option_size(wtap_optval_t *optval)
|
||||||
static gboolean
|
static gboolean
|
||||||
compute_block_option_size(wtap_block_t block _U_, guint option_id, wtap_opttype_e option_type, wtap_optval_t *optval, void *user_data)
|
compute_block_option_size(wtap_block_t block _U_, guint option_id, wtap_opttype_e option_type, wtap_optval_t *optval, void *user_data)
|
||||||
{
|
{
|
||||||
compute_options_size_t* compute_options_size = (compute_options_size_t*)user_data;
|
compute_options_size_t* options_size = (compute_options_size_t*)user_data;
|
||||||
guint32 size = 0;
|
guint32 size = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4027,7 +4027,7 @@ compute_block_option_size(wtap_block_t block _U_, guint option_id, wtap_opttype_
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Block-type dependent; call the callback. */
|
/* Block-type dependent; call the callback. */
|
||||||
size = (*compute_options_size->compute_option_size)(block, option_id, option_type, optval);
|
size = (*options_size->compute_option_size)(block, option_id, option_type, optval);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4039,15 +4039,15 @@ compute_block_option_size(wtap_block_t block _U_, guint option_id, wtap_opttype_
|
||||||
* Yes. Add the size of the option header to the size of the
|
* Yes. Add the size of the option header to the size of the
|
||||||
* option data.
|
* option data.
|
||||||
*/
|
*/
|
||||||
compute_options_size->size += 4;
|
options_size->size += 4;
|
||||||
|
|
||||||
/* Now add the size of the option value. */
|
/* Now add the size of the option value. */
|
||||||
compute_options_size->size += size;
|
options_size->size += size;
|
||||||
|
|
||||||
/* Add optional padding to 32 bits */
|
/* Add optional padding to 32 bits */
|
||||||
if ((size & 0x03) != 0)
|
if ((size & 0x03) != 0)
|
||||||
{
|
{
|
||||||
compute_options_size->size += 4 - (size & 0x03);
|
options_size->size += 4 - (size & 0x03);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE; /* we always succeed */
|
return TRUE; /* we always succeed */
|
||||||
|
@ -4605,7 +4605,7 @@ static gboolean pcapng_write_packet_verdict_option(wtap_dumper *wdh, guint optio
|
||||||
|
|
||||||
static gboolean write_block_option(wtap_block_t block, guint option_id, wtap_opttype_e option_type _U_, wtap_optval_t *optval, void* user_data)
|
static gboolean write_block_option(wtap_block_t block, guint option_id, wtap_opttype_e option_type _U_, wtap_optval_t *optval, void* user_data)
|
||||||
{
|
{
|
||||||
write_options_t* write_options = (write_options_t*)user_data;
|
write_options_t* options = (write_options_t*)user_data;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Process the option IDs that are the same for all block types here;
|
* Process the option IDs that are the same for all block types here;
|
||||||
|
@ -4614,12 +4614,12 @@ static gboolean write_block_option(wtap_block_t block, guint option_id, wtap_opt
|
||||||
switch(option_id)
|
switch(option_id)
|
||||||
{
|
{
|
||||||
case OPT_COMMENT:
|
case OPT_COMMENT:
|
||||||
if (!pcapng_write_string_option(write_options->wdh, option_id, optval, write_options->err))
|
if (!pcapng_write_string_option(options->wdh, option_id, optval, options->err))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
case OPT_CUSTOM_STR_COPY:
|
case OPT_CUSTOM_STR_COPY:
|
||||||
case OPT_CUSTOM_BIN_COPY:
|
case OPT_CUSTOM_BIN_COPY:
|
||||||
if (!pcapng_write_custom_option(write_options->wdh, option_id, optval, write_options->err))
|
if (!pcapng_write_custom_option(options->wdh, option_id, optval, options->err))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
case OPT_CUSTOM_STR_NO_COPY:
|
case OPT_CUSTOM_STR_NO_COPY:
|
||||||
|
@ -4634,8 +4634,8 @@ static gboolean write_block_option(wtap_block_t block, guint option_id, wtap_opt
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Block-type dependent; call the callback, if we have one. */
|
/* Block-type dependent; call the callback, if we have one. */
|
||||||
if (write_options->write_option != NULL &&
|
if (options->write_option != NULL &&
|
||||||
!(*write_options->write_option)(write_options->wdh, block, option_id, option_type, optval, write_options->err))
|
!(*options->write_option)(options->wdh, block, option_id, option_type, optval, options->err))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4645,12 +4645,12 @@ static gboolean write_block_option(wtap_block_t block, guint option_id, wtap_opt
|
||||||
static gboolean
|
static gboolean
|
||||||
write_options(wtap_dumper *wdh, wtap_block_t block, write_option_func write_option, int *err)
|
write_options(wtap_dumper *wdh, wtap_block_t block, write_option_func write_option, int *err)
|
||||||
{
|
{
|
||||||
write_options_t write_options;
|
write_options_t options;
|
||||||
|
|
||||||
write_options.wdh = wdh;
|
options.wdh = wdh;
|
||||||
write_options.err = err;
|
options.err = err;
|
||||||
write_options.write_option = write_option;
|
options.write_option = write_option;
|
||||||
if (!wtap_block_foreach_option(block, write_block_option, &write_options))
|
if (!wtap_block_foreach_option(block, write_block_option, &options))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* Write end of options */
|
/* Write end of options */
|
||||||
|
|
Loading…
Reference in New Issue