diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2012-09-03 21:25:07 +0000 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2012-09-03 21:25:07 +0000 |
commit | a31e9fc2ccc1178700e98610d087ca6cf07a2999 (patch) | |
tree | 502e14feba460333614b287fd5ba2e0e0c3f32b3 /epan/dissectors/packet-dvb-nit.c | |
parent | 677d843489766002025820172f02b669fd305040 (diff) | |
download | wireshark-a31e9fc2ccc1178700e98610d087ca6cf07a2999.tar.gz |
unify the handling for all DVB/MPEG sections
don't initialize pointer where it's not required
remove unnecessary 'if (tree)' checks
svn path=/trunk/; revision=44762
Diffstat (limited to 'epan/dissectors/packet-dvb-nit.c')
-rw-r--r-- | epan/dissectors/packet-dvb-nit.c | 10 |
1 files changed, 4 insertions, 6 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); |