proto_tree *tree,
void *data _U_)
{
- int type = no_msg;
- proto_item *ti = NULL;
- proto_tree *sub_tree = NULL;
+ int type;
+ proto_item *ti;
+ proto_tree *sub_tree;
ti = proto_tree_add_text(
tree,
atn_conversation_t *atn_cv = NULL;
volatile gboolean is_atn_cpdlc = FALSE;
volatile gboolean is_pm = FALSE;
- int type = no_msg;
+ int type;
type = check_heur_msg_type(pinfo);
TRY {
dissect_ProtectedGroundPDUs_PDU(tvb, pinfo, NULL);
is_atn_cpdlc = TRUE;
- is_pm = TRUE;}
- break;
+ is_pm = TRUE;
+ break;}
CATCH_ALL{
is_atn_cpdlc = FALSE;
is_pm = FALSE;}
guint i;
guint8 category;
guint16 length;
- proto_item *asterix_packet_item = NULL;
- proto_tree *asterix_packet_tree = NULL;
+ proto_item *asterix_packet_item;
+ proto_tree *asterix_packet_tree;
for (i = 0; i < tvb_reported_length (tvb); i += length + 3) {
category = tvb_get_guint8 (tvb, i);
length = (tvb_get_guint8 (tvb, i + 1) << 8) + tvb_get_guint8 (tvb, i + 2) - 3; /* -3 for category and length */
- asterix_packet_item = NULL;
- asterix_packet_tree = NULL;
asterix_packet_item = proto_tree_add_item (tree, proto_asterix, tvb, i, length + 3, ENC_NA);
proto_item_append_text (asterix_packet_item, ", Category %03d", category);
asterix_packet_tree = proto_item_add_subtree (asterix_packet_item, ett_asterix);
if (field->part != NULL) {
for (i = 0, inner_offset = 0, go_on = 1; go_on && field->part[i] != NULL; i++) {
- value = G_GINT64_CONSTANT(0);;
value = tvb_get_bits64 (tvb, offset * 8 + inner_offset, field->part[i]->bit_length, ENC_BIG_ENDIAN);
if (field->part[i]->hf != NULL) {
switch (field->part[i]->type) {
proto_tree *tree,
void *data _U_)
{
- int type = no_msg;
- proto_item *ti = NULL;
- proto_tree *sub_tree = NULL;
+ int type;
+ proto_item *ti;
+ proto_tree *sub_tree;
ti = proto_tree_add_text(
tree,
atn_conversation_t *atn_cv = NULL;
volatile gboolean is_atn_cpdlc = FALSE;
volatile gboolean is_pm = FALSE;
- int type = no_msg;
+ int type;
type = check_heur_msg_type(pinfo);
TRY {
dissect_ProtectedGroundPDUs_PDU(tvb, pinfo, NULL);
is_atn_cpdlc = TRUE;
- is_pm = TRUE;}
- break;
+ is_pm = TRUE;
+ break;}
CATCH_ALL{
is_atn_cpdlc = FALSE;
is_pm = FALSE;}
proto_item *tf;
struct unicast_frag_packet_v12 *unicast_frag_packeth;
const guint8 *dest_addr, *orig_addr;
- gboolean save_fragmented = FALSE;
+ gboolean save_fragmented;
fragment_head *frag_msg = NULL;
proto_tree *batadv_unicast_frag_tree = NULL, *flag_tree;
proto_item *tf;
struct unicast_frag_packet_v14 *unicast_frag_packeth;
const guint8 *dest_addr, *orig_addr;
- gboolean save_fragmented = FALSE;
+ gboolean save_fragmented;
fragment_head *frag_msg = NULL;
proto_tree *batadv_unicast_frag_tree = NULL, *flag_tree;
vars->next = NULL;
generate_hash_key(pinfo,0,key,NULL);
- existing_vars = NULL;
existing_vars = (netlogon_auth_vars *)g_hash_table_lookup(netlogon_auths, key);
if (!existing_vars) {
debugprintf("Adding initial vars with this start packet = %d\n",vars->start);
{
proto_item *item;
guint3264 len;
- proto_tree *subtree = tree;
+ proto_tree *subtree;
item = proto_tree_add_text(tree, tvb, offset, 0, "%s",
proto_registrar_get_name(hf_index));
}
}
if(new_tvb && tvb_length(new_tvb) > 0) {
- gboolean decoded = TRUE;
+ gboolean decoded;
tvbuff_t *dtvb = NULL;
const guint8 *input = tvb_get_ptr(new_tvb, 0, -1);
guint32 reassembled_size = tvb_length(new_tvb);
guint8 opt_ie_cnt=0;
guint8 i;
- if (tag_len < 2 && tag_len <= 5) {
+ if (tag_len < 2 || tag_len > 5) {
expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
"VHT TX PWR Envelope IE length %u wrong, must be >= 2 and <= 5", tag_len);
return offset;
/* Parse the WAPI Parameter Set IE Here*/
proto_item *item;
proto_tree *subtree;
- guint16 loop_cnt, version = 1, akm_cnt = 1, ucast_cnt = 1, bkid_cnt = 1;
+ guint16 loop_cnt, version, akm_cnt = 1, ucast_cnt = 1, bkid_cnt = 1;
guint8 akm_suite_type = 0, ucast_cipher_type = 0, mcast_cipher_type = 0;
version = tvb_get_letohs(tvb, offset);
guint16 addr_len = 0;
gint offset = 0;
guint16 flags;
- gboolean mrep = FALSE;
- gboolean smr = FALSE;
- gboolean probe = FALSE;
- gboolean pitr = FALSE;
- gboolean smr_invoked = FALSE;
+ gboolean mrep;
+ gboolean smr;
+ gboolean probe;
+ gboolean pitr;
+ gboolean smr_invoked;
guint8 itr_rec_cnt = 0;
guint8 rec_cnt = 0;
guint16 src_eid_afi;
{
int i;
gint offset = 0;
- gboolean probe = FALSE;
+ gboolean probe;
guint8 flags;
guint8 rec_cnt = 0;
tvbuff_t *next_tvb;
tvbuff_t *next_tvb;
guint16 authlen = 0;
guint16 flags;
- gboolean xtrid = FALSE;
- gboolean rtr = FALSE;
+ gboolean xtrid;
+ gboolean rtr;
/* Flags (1 bit) */
proto_tree_add_item(lisp_tree, hf_lisp_mreg_flags_pmr, tvb, offset, 3, ENC_BIG_ENDIAN);
tvbuff_t *next_tvb;
guint16 authlen = 0;
guint16 flags;
- gboolean xtrid = FALSE;
- gboolean rtr = FALSE;
+ gboolean xtrid;
+ gboolean rtr;
/* Flags defined in NAT Traversal draft (2 bits) */
flags = tvb_get_ntohs(tvb, offset);
{
const drx_state_key_t *p1 = (const drx_state_key_t*)v;
- /* XXX which one return ? */
return p1->frameNumber + (p1->pdu_instance >> 8);
- return GPOINTER_TO_UINT(v);
}
curr_offset++;
}
} else {
+ /* XXX dead code? Expression is always false because
+ * the condition matches previous condition in the
+ * original if (so if it were true we'd never get
+ * to this 'else' block in the first place) */
if ((gint16)(computed_header_offset + 1 - curr_offset) != pdu_lengths[n]) {
expert_add_info_format(pinfo, ephr_ti, &ei_mac_lte_control_element_size_invalid,
"Control Element has an unexpected size (computed=%d, actual=%d)",
do {
/* Read document elements */
- guint8 e_type = -1; /* Element type */
+ guint8 e_type; /* Element type */
gint str_len = -1; /* String length */
gint e_len = -1; /* Element length */
gint doc_len = -1; /* Document length */
offset+=4;
return offset;
- return offset;
}