aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-frame.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-08-28 23:43:44 -0700
committerGuy Harris <gharris@sonic.net>2021-08-28 23:43:44 -0700
commit5e2fb6c000b58ea0b517de662d0019c48da49734 (patch)
treed7a5177c65399c7566b655eb9a8abe1f2fa18271 /epan/dissectors/packet-frame.c
parent266d707dff878b1881b634f39ac4ef99a7ddbb98 (diff)
packet-frame: assorted cleanups.
Remove unnecessary initializations. Rename the variable for the packet ID option to match the name of the option (it's epb_packetid in the pcapng spec, with no underscore between "packet" and "id").
Diffstat (limited to 'epan/dissectors/packet-frame.c')
-rw-r--r--epan/dissectors/packet-frame.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c
index 24cef3a4c5..ac63ba34a1 100644
--- a/epan/dissectors/packet-frame.c
+++ b/epan/dissectors/packet-frame.c
@@ -343,10 +343,10 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
{
proto_item *volatile ti = NULL;
guint cap_len = 0, frame_len = 0;
- guint32 pack_flags = 0;
- guint32 interface_queue = 0;
- guint64 drop_count = 0;
- guint64 packet_id = 0;
+ guint32 pack_flags;
+ guint32 interface_queue;
+ guint64 drop_count;
+ guint64 packetid;
proto_tree *volatile tree;
proto_tree *comments_tree;
proto_tree *volatile fh_tree = NULL;
@@ -671,8 +671,8 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
proto_tree_add_bitmask_list_value(flags_tree, tvb, 0, 0, flags, pack_flags);
}
- if (WTAP_OPTTYPE_SUCCESS == wtap_block_get_uint64_option_value(fr_data->pkt_block, OPT_PKT_PACKETID, &packet_id)) {
- proto_tree_add_uint64(fh_tree, hf_frame_packet_id, tvb, 0, 0, packet_id);
+ if (WTAP_OPTTYPE_SUCCESS == wtap_block_get_uint64_option_value(fr_data->pkt_block, OPT_PKT_PACKETID, &packetid)) {
+ proto_tree_add_uint64(fh_tree, hf_frame_packet_id, tvb, 0, 0, packetid);
}
if (wtap_block_count_option(fr_data->pkt_block, OPT_PKT_VERDICT) > 0) {