diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2017-08-30 22:49:11 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-08-30 22:53:07 +0000 |
commit | 63b66cc7c8a6ec4e28eabd0bea135a70ed707754 (patch) | |
tree | 61eab5d99bb5088e2e88fbea43e0be38c2aaa15a /epan/dissectors/packet-vxi11.c | |
parent | 8d13f14f958b9ee00b59fd869bd1630f76e6fa65 (diff) |
vxi11: remove some unnecessary NULL checks
Change-Id: I6a188a8c3f84284bb9dee406aee124f7e581f643
Reviewed-on: https://code.wireshark.org/review/23315
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-vxi11.c')
-rw-r--r-- | epan/dissectors/packet-vxi11.c | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/epan/dissectors/packet-vxi11.c b/epan/dissectors/packet-vxi11.c index 82e2b17db1..2e0f928a93 100644 --- a/epan/dissectors/packet-vxi11.c +++ b/epan/dissectors/packet-vxi11.c @@ -221,10 +221,7 @@ dissect_error(tvbuff_t *tvb, offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_error, offset); - if (tree) - { - proto_item_append_text(tree, " (%s) %s", packet_type, errstr); - } + proto_item_append_text(tree, " (%s) %s", packet_type, errstr); col_append_fstr(pinfo->cinfo, COL_INFO, " %s", errstr); return offset; @@ -402,10 +399,7 @@ dissect_device_docmd_parms(tvbuff_t *tvb, offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_size, offset); offset = dissect_rpc_opaque_data(tvb, offset, tree, NULL, hf_vxi11_core_data, FALSE, 0, FALSE, NULL, NULL); - if (tree) - { - proto_item_append_text(tree, " (Device_DocmdParms) LID=%d CMD=%s", lid, cmdstr); - } + proto_item_append_text(tree, " (Device_DocmdParms) LID=%d CMD=%s", lid, cmdstr); col_append_fstr(pinfo->cinfo, COL_INFO, " LID=%d CMD=%s", lid, cmdstr); return offset; @@ -437,10 +431,7 @@ dissect_device_enable_SRQ_parms(tvbuff_t *tvb, offset = dissect_rpc_bool(tvb, tree, hf_vxi11_core_enable, offset); offset = dissect_rpc_opaque_data(tvb, offset, tree, NULL, hf_vxi11_core_handle, FALSE, 0, FALSE, NULL, NULL); - if (tree) - { - proto_item_append_text(tree, " (Device_EnableSrqParms) LID=%d", lid); - } + proto_item_append_text(tree, " (Device_EnableSrqParms) LID=%d", lid); col_append_fstr(pinfo->cinfo, COL_INFO, " LID=%d", lid); return offset; @@ -469,10 +460,7 @@ dissect_device_generic_parms(tvbuff_t *tvb, offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_io_timeout, offset); offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_lock_timeout, offset); - if (tree) - { - proto_item_append_text(tree, " (Device_GenericParms) LID=%d", lid); - } + proto_item_append_text(tree, " (Device_GenericParms) LID=%d", lid); col_append_fstr(pinfo->cinfo, COL_INFO, " LID=%d", lid); return offset; @@ -488,10 +476,7 @@ dissect_device_link(tvbuff_t *tvb, offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_lid, offset); - if (tree) - { - proto_item_append_text(tree, " (Device_Link) LID=%d", lid); - } + proto_item_append_text(tree, " (Device_Link) LID=%d", lid); col_append_fstr(pinfo->cinfo, COL_INFO, " LID=%d", lid); return offset; @@ -509,10 +494,7 @@ dissect_device_lock_parms(tvbuff_t *tvb, offset = dissect_flags(tvb, offset, tree); offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_lock_timeout, offset); - if (tree) - { - proto_item_append_text(tree, " (Device_LockParms) LID=%d", lid); - } + proto_item_append_text(tree, " (Device_LockParms) LID=%d", lid); col_append_fstr(pinfo->cinfo, COL_INFO, " LID=%d", lid); return offset; @@ -629,10 +611,7 @@ dissect_device_write_parms(tvbuff_t *tvb, col_append_fstr( pinfo->cinfo, COL_INFO," %s",tvb_format_text(tvb, offset+4,(guint32) datalength)); offset = dissect_rpc_opaque_data(tvb, offset, tree, NULL, hf_vxi11_core_data, FALSE, 0, FALSE, NULL, NULL); - if (tree) - { - proto_item_append_text(tree, " (Device_WriteParms) LID=%d", lid); - } + proto_item_append_text(tree, " (Device_WriteParms) LID=%d", lid); return offset; } |