diff options
author | Bill Meier <wmeier@newsguy.com> | 2012-04-26 16:47:37 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2012-04-26 16:47:37 +0000 |
commit | 557ed5e97175f0eba8e0d0a3b9a90de14cb533cc (patch) | |
tree | 8b1de4079e42414a6aa17874917de35a0fa6a3a6 /epan/dissectors/packet-echo.c | |
parent | 781891bd7bd06316fc6859f02eae107d41fcfc3a (diff) |
Minor: reformatting, unneeded #includes, whitespace cleanup;
Also: use val_to_str_const(0 instead of val_to_str() in a few cases.
svn path=/trunk/; revision=42271
Diffstat (limited to 'epan/dissectors/packet-echo.c')
-rw-r--r-- | epan/dissectors/packet-echo.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/epan/dissectors/packet-echo.c b/epan/dissectors/packet-echo.c index 24b066cfd2..82b8f5d899 100644 --- a/epan/dissectors/packet-echo.c +++ b/epan/dissectors/packet-echo.c @@ -34,7 +34,7 @@ #include <glib.h> #include <epan/packet.h> -#define ECHO_PORT 7 +#define ECHO_PORT 7 static int proto_echo = -1; @@ -47,10 +47,8 @@ static gint ett_echo = -1; static void dissect_echo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree *echo_tree = NULL; - proto_item *ti, *hidden_item; - int offset = 0; - gboolean request = FALSE; + int offset = 0; + gboolean request = FALSE; if (pinfo->destport == ECHO_PORT) { request = TRUE; @@ -60,10 +58,12 @@ static void dissect_echo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (check_col(pinfo->cinfo, COL_INFO)) { col_set_str(pinfo->cinfo, COL_INFO, - (request) ? "Request" : "Response"); + (request) ? "Request" : "Response"); } if (tree) { + proto_tree *echo_tree; + proto_item *ti, *hidden_item; ti = proto_tree_add_item(tree, proto_echo, tvb, offset, -1, ENC_NA); echo_tree = proto_item_add_subtree(ti, ett_echo); @@ -86,17 +86,17 @@ void proto_register_echo(void) static hf_register_info hf[] = { { &hf_echo_data, - { "Echo data", "echo.data", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + { "Echo data", "echo.data", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, { &hf_echo_request, - { "Echo request", "echo.request", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "Echo data", HFILL }}, + { "Echo request", "echo.request", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "Echo data", HFILL }}, { &hf_echo_response, { "Echo response","echo.response", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "Echo data", HFILL }} + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "Echo data", HFILL }} }; static gint *ett[] = { |