From 2d774c6f84c690ee342b3baa0070c3d480df811d Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Tue, 22 Apr 2014 10:48:41 -0400 Subject: Minor cleanup - Remove unneeded #includes; - Move proto_reg_handoff...(() to the end of the file as per convention; - Use dissector_add_handle() instead of using dissector_add_uint(..., 0, ...); - #if 0 an unused global function (which caused a [-Wmissing-prototypes] warning); - Remove an empty proto_reg-handoff...(); - 'if (already_registered)' not required in one case. Change-Id: I74f267c2721df13eb4d52d7f19a6ded423218a39 Reviewed-on: https://code.wireshark.org/review/1277 Reviewed-by: Bill Meier --- epan/dissectors/packet-lbm.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'epan/dissectors/packet-lbm.c') diff --git a/epan/dissectors/packet-lbm.c b/epan/dissectors/packet-lbm.c index dc20632f3d..9a4fe604f6 100644 --- a/epan/dissectors/packet-lbm.c +++ b/epan/dissectors/packet-lbm.c @@ -25,12 +25,9 @@ #include "config.h" #include #include -#include -#include #include "packet-lbm.h" void proto_register_lbm(void); -void proto_reg_handoff_lbm(void); /* Protocol handle */ static int lbm_protocol_handle = -1; @@ -68,16 +65,10 @@ static void lbm_init(void) lbm_channel_reset(); } -/* The registration hand-off routine */ -void proto_reg_handoff_lbm(void) -{ -} - /* Register all the bits needed with the filtering engine */ void proto_register_lbm(void) { - lbm_protocol_handle = proto_register_protocol("LBM Protocol", "LBM", "lbm"); - (void)prefs_register_protocol_subtree("29West", lbm_protocol_handle, proto_reg_handoff_lbm); + lbm_protocol_handle = proto_register_protocol("LBM Protocol", "LBM", "lbm"); /* XXX: not used/needed ? */ register_init_routine(lbm_init); } @@ -218,6 +209,7 @@ gboolean lbm_channel_is_known(guint64 channel) return (!lbm_channel_is_unknown_transport_lbttcp(channel) && !lbm_channel_is_unknown_stream_tcp(channel)); } +#if 0 /* XXX:not used ?? */ guint64 lbm_channel_id(guint64 channel) { guint64 id; @@ -225,6 +217,7 @@ guint64 lbm_channel_id(guint64 channel) id = (channel & LBM_CHANNEL_VALUE_MASK) >> LBM_CHANNEL_VALUE_SHIFT_COUNT; return (id); } +#endif /*----------------------------------------------------------------------------*/ /* Frame/SQN interface. */ -- cgit v1.2.3