diff options
-rw-r--r-- | epan/dissectors/packet-dvb-nit.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-mpeg-ca.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-mpeg-pat.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-mpeg-pmt.c | 10 |
4 files changed, 16 insertions, 22 deletions
diff --git a/epan/dissectors/packet-dvb-nit.c b/epan/dissectors/packet-dvb-nit.c index 2f46f98f30..8e6fffcd25 100644 --- a/epan/dissectors/packet-dvb-nit.c +++ b/epan/dissectors/packet-dvb-nit.c @@ -86,17 +86,15 @@ dissect_dvb_nit(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint16 tsid; - proto_item *ti = NULL; - proto_tree *dvb_nit_tree = NULL; + proto_item *ti; + proto_tree *dvb_nit_tree; proto_item *tsi; proto_tree *dvb_nit_ts_tree; col_set_str(pinfo->cinfo, COL_INFO, "Network Information Table (NIT)"); - if (tree) { - ti = proto_tree_add_item(tree, proto_dvb_nit, tvb, offset, -1, ENC_NA); - dvb_nit_tree = proto_item_add_subtree(ti, ett_dvb_nit); - } + ti = proto_tree_add_item(tree, proto_dvb_nit, tvb, offset, -1, ENC_NA); + dvb_nit_tree = proto_item_add_subtree(ti, ett_dvb_nit); offset += packet_mpeg_sect_header(tvb, offset, dvb_nit_tree, NULL, NULL); diff --git a/epan/dissectors/packet-mpeg-ca.c b/epan/dissectors/packet-mpeg-ca.c index f332d13a77..a6995f4df4 100644 --- a/epan/dissectors/packet-mpeg-ca.c +++ b/epan/dissectors/packet-mpeg-ca.c @@ -63,17 +63,15 @@ dissect_mpeg_ca(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint offset = 0, length = 0; - proto_item *ti = NULL; - proto_tree *mpeg_ca_tree = NULL; + proto_item *ti; + proto_tree *mpeg_ca_tree; /* The TVB should start right after the section_length in the Section packet */ col_set_str(pinfo->cinfo, COL_INFO, "Conditional Access Table (CA)"); - if (tree) { - ti = proto_tree_add_item(tree, proto_mpeg_ca, tvb, offset, -1, ENC_NA); - mpeg_ca_tree = proto_item_add_subtree(ti, ett_mpeg_ca); - } + ti = proto_tree_add_item(tree, proto_mpeg_ca, tvb, offset, -1, ENC_NA); + mpeg_ca_tree = proto_item_add_subtree(ti, ett_mpeg_ca); offset += packet_mpeg_sect_header(tvb, offset, mpeg_ca_tree, &length, NULL); length -= 4; diff --git a/epan/dissectors/packet-mpeg-pat.c b/epan/dissectors/packet-mpeg-pat.c index b538bebba8..2a735488f6 100644 --- a/epan/dissectors/packet-mpeg-pat.c +++ b/epan/dissectors/packet-mpeg-pat.c @@ -71,10 +71,10 @@ dissect_mpeg_pat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint offset = 0, length = 0; guint16 prog_num = 0, prog_pid; - proto_item *ti = NULL; - proto_tree *mpeg_pat_tree = NULL; - proto_item *pi = NULL; - proto_tree *mpeg_pat_prog_tree = NULL; + proto_item *ti; + proto_tree *mpeg_pat_tree; + proto_item *pi; + proto_tree *mpeg_pat_prog_tree; /* The TVB should start right after the section_length in the Section packet */ diff --git a/epan/dissectors/packet-mpeg-pmt.c b/epan/dissectors/packet-mpeg-pmt.c index e755daaa0a..73442e6fc3 100644 --- a/epan/dissectors/packet-mpeg-pmt.c +++ b/epan/dissectors/packet-mpeg-pmt.c @@ -127,8 +127,8 @@ dissect_mpeg_pmt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint descriptor_end, prog_info_len, es_info_len; guint16 pid; - proto_item *ti = NULL; - proto_tree *mpeg_pmt_tree = NULL; + proto_item *ti; + proto_tree *mpeg_pmt_tree; proto_item *si; proto_tree *mpeg_pmt_stream_tree; @@ -136,10 +136,8 @@ dissect_mpeg_pmt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_INFO, "Program Map Table (PMT)"); - if (tree) { - ti = proto_tree_add_item(tree, proto_mpeg_pmt, tvb, offset, -1, ENC_NA); - mpeg_pmt_tree = proto_item_add_subtree(ti, ett_mpeg_pmt); - } + ti = proto_tree_add_item(tree, proto_mpeg_pmt, tvb, offset, -1, ENC_NA); + mpeg_pmt_tree = proto_item_add_subtree(ti, ett_mpeg_pmt); offset += packet_mpeg_sect_header(tvb, offset, mpeg_pmt_tree, &length, NULL); length -= 4; |