diff options
author | Bill Meier <wmeier@newsguy.com> | 2012-05-17 20:13:22 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2012-05-17 20:13:22 +0000 |
commit | bab856a50433ce4b172ebc7a180a3bfb3e721503 (patch) | |
tree | 33c51d7fbfa41575c0c3ad159c7ddb3780d85c46 /epan/dissectors/packet-hpteam.c | |
parent | b4624651e9c8c0689e25306f071f3f241f3dfdb4 (diff) |
General cleanup including as appropriate:
- Remove unneeded #include files (string.h, addr_resolv.h);
- Remove unneeded 'if(!initialized){...}' in proto_reg_handoff();
- Reformat hf[] entries;
- Remove unneeded variable initializations;
- "localize" some variables;
- Whitespace/indentation/long lines/formatting
(in one case: re-order code slightly to not do col_set_str() & etc until
after initial "frame acceptance testing" by dissector.
svn path=/trunk/; revision=42683
Diffstat (limited to 'epan/dissectors/packet-hpteam.c')
-rw-r--r-- | epan/dissectors/packet-hpteam.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/epan/dissectors/packet-hpteam.c b/epan/dissectors/packet-hpteam.c index e03bc51dc7..100b0d26b6 100644 --- a/epan/dissectors/packet-hpteam.c +++ b/epan/dissectors/packet-hpteam.c @@ -29,9 +29,9 @@ #endif #include <glib.h> + #include <epan/packet.h> #include <epan/oui.h> -#include <string.h> #include <packet-llc.h> @@ -92,18 +92,17 @@ static gint ett_hpteam = -1; static void dissect_hpteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_item *hpteam_item; - proto_tree *hpteam_tree; - guint32 offset = 0; col_set_str(pinfo->cinfo, COL_PROTOCOL, "HP NIC Team"); col_add_fstr(pinfo->cinfo, COL_INFO, "HP NIC Teaming Heartbeat; Port MAC = %s", ep_address_to_str(&pinfo->dl_src)); if (tree) { /* we are being asked for details */ + proto_item *hpteam_item; + proto_tree *hpteam_tree; hpteam_item = proto_tree_add_item(tree, proto_hpteam, tvb, 0, -1, ENC_NA); hpteam_tree = proto_item_add_subtree(hpteam_item, ett_hpteam); - proto_tree_add_item(hpteam_tree, hf_hpteam, tvb, offset, -1, ENC_NA); + proto_tree_add_item(hpteam_tree, hf_hpteam, tvb, 0, -1, ENC_NA); } } @@ -111,14 +110,17 @@ void proto_register_hpteam(void) { static hf_register_info hf_pid = { &hf_llc_hpteam_pid, - { "PID", "llc.hpteam_pid", FT_UINT16, BASE_HEX, - VALS(hpteam_pid_vals), 0x0, NULL, HFILL } + { "PID", "llc.hpteam_pid", + FT_UINT16, BASE_HEX, VALS(hpteam_pid_vals), + 0x0, NULL, HFILL } }; static hf_register_info hf_data[] = { {&hf_hpteam, - { "Proprietary Data", "hpteam.data", FT_BYTES, BASE_NONE, - NULL, 0x0, NULL, HFILL }} + { "Proprietary Data", "hpteam.data", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } + } }; static gint *ett[] = { |