diff options
author | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-13 21:00:44 +0000 |
---|---|---|
committer | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-13 21:00:44 +0000 |
commit | 5a7a7763b3fd7aa42886a6c57e317618e8b85047 (patch) | |
tree | 4f7aa851afe9ccbdc9c4b638e1fb9ad9c5465983 /epan/dissectors/packet-smb.c | |
parent | a4c3d9cb78ba2ab1dea4a0ac91567cbeb0d209c0 (diff) |
Comment out code to create a subtree since it's (currently ?) unused: Coverity 1039;
Don't assign to a proto_item * if the value won't be used: Coverity 1040 & 1041.
Remove some unneede #includes;
Do some minor indentation & whitespace cleanup.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36630 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-smb.c')
-rw-r--r-- | epan/dissectors/packet-smb.c | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c index 7e00f9a13c..64646a5863 100644 --- a/epan/dissectors/packet-smb.c +++ b/epan/dissectors/packet-smb.c @@ -30,10 +30,7 @@ # include "config.h" #endif -#include <time.h> -#include <string.h> #include <glib.h> -#include <ctype.h> #include <epan/packet.h> #include <epan/conversation.h> #include <epan/emem.h> @@ -9317,8 +9314,8 @@ dissect_nt_trans_setup_response(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, int len, nt_trans_data *ntd _U_) { - proto_item *item = NULL; - proto_tree *tree = NULL; + /*proto_item *item = NULL;*/ + /*proto_tree *tree = NULL;*/ smb_info_t *si; smb_nt_transact_info_t *nti; @@ -9333,7 +9330,7 @@ dissect_nt_trans_setup_response(tvbuff_t *tvb, packet_info *pinfo, if(parent_tree){ tvb_ensure_bytes_exist(tvb, offset, len); if(nti != NULL){ - item = proto_tree_add_text(parent_tree, tvb, offset, len, + /*item = */proto_tree_add_text(parent_tree, tvb, offset, len, "%s Setup", val_to_str_ext(nti->subcmd, &nt_cmd_vals_ext, "Unknown NT Transaction (%u)")); } else { @@ -9341,10 +9338,10 @@ dissect_nt_trans_setup_response(tvbuff_t *tvb, packet_info *pinfo, * We never saw the request to which this is a * response. */ - item = proto_tree_add_text(parent_tree, tvb, offset, len, + /*item = */proto_tree_add_text(parent_tree, tvb, offset, len, "Unknown NT Transaction Setup (matching request not seen)"); } - tree = proto_item_add_subtree(item, ett_smb_nt_trans_setup); + /*tree = proto_item_add_subtree(item, ett_smb_nt_trans_setup);*/ } if (nti == NULL) { @@ -15247,8 +15244,8 @@ dissect_transaction2_response_data(tvbuff_t *tvb, packet_info *pinfo, "Unknown (0x%02x)")); tree = proto_item_add_subtree(item, ett_smb_transaction_data); } else { - item = proto_tree_add_text(parent_tree, tvb, offset, dc, - "Unknown Transaction2 Data"); + proto_tree_add_text(parent_tree, tvb, offset, dc, + "Unknown Transaction2 Data"); } } @@ -15264,17 +15261,18 @@ dissect_transaction2_response_data(tvbuff_t *tvb, packet_info *pinfo, /* returned data */ count = si->info_count; - if(count == -1) { - break; - } + if(count == -1) { + break; + } + if (count && check_col(pinfo->cinfo, COL_INFO)) { col_append_str(pinfo->cinfo, COL_INFO, - ", Files:"); + ", Files:"); } while(count--){ offset = dissect_ff2_response_data(tvb, pinfo, tree, - offset, &dc, &trunc); + offset, &dc, &trunc); if (trunc) break; } @@ -15283,12 +15281,12 @@ dissect_transaction2_response_data(tvbuff_t *tvb, packet_info *pinfo, /* returned data */ count = si->info_count; - if(count == -1) { - break; - } + if(count == -1) { + break; + } if (count && check_col(pinfo->cinfo, COL_INFO)) { col_append_str(pinfo->cinfo, COL_INFO, - ", Files:"); + ", Files:"); } while(count--){ @@ -15422,8 +15420,8 @@ dissect_transaction2_response_parameters(tvbuff_t *tvb, packet_info *pinfo, prot "Unknown (0x%02x)")); tree = proto_item_add_subtree(item, ett_smb_transaction_params); } else { - item = proto_tree_add_text(parent_tree, tvb, offset, pc, - "Unknown Transaction2 Parameters"); + proto_tree_add_text(parent_tree, tvb, offset, pc, + "Unknown Transaction2 Parameters"); } } |