aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-netlink.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2016-01-17 17:22:47 +0100
committerMartin Kaiser <wireshark@kaiser.cx>2016-01-17 16:23:46 +0000
commitaccaa90d46fdfe3410d0d0a8f4490fb50d062be3 (patch)
tree67c73771712b189d4242dd9263336244a37a7bbe /epan/dissectors/packet-netlink.c
parent65ee5f9a5c3adb6abc6cf2be5aafea1321df5176 (diff)
[netlink] remove an unnecessary if (tree) check
Change-Id: Id9d20bf98550cfb879c107063d0011840536538a Reviewed-on: https://code.wireshark.org/review/13361 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan/dissectors/packet-netlink.c')
-rw-r--r--epan/dissectors/packet-netlink.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/epan/dissectors/packet-netlink.c b/epan/dissectors/packet-netlink.c
index a4cb09503b..4b9d3e3006 100644
--- a/epan/dissectors/packet-netlink.c
+++ b/epan/dissectors/packet-netlink.c
@@ -254,7 +254,7 @@ dissect_netlink(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *_data
guint16 protocol, hatype;
proto_item *ti;
tvbuff_t *next_tvb;
- proto_tree *fh_tree = NULL;
+ proto_tree *fh_tree;
int offset;
@@ -265,11 +265,9 @@ dissect_netlink(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *_data
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Netlink");
col_clear(pinfo->cinfo, COL_INFO);
- if (tree) {
- ti = proto_tree_add_protocol_format(tree, hfi_netlink->id, tvb, 0,
- SLL_HEADER_SIZE, "Linux netlink (cooked header)");
- fh_tree = proto_item_add_subtree(ti, ett_netlink_cooked);
- }
+ ti = proto_tree_add_protocol_format(tree, hfi_netlink->id, tvb, 0,
+ SLL_HEADER_SIZE, "Linux netlink (cooked header)");
+ fh_tree = proto_item_add_subtree(ti, ett_netlink_cooked);
/* Unused 2B */
offset = 2;